Documentation ¶
Index ¶
- type Conn
- func (c *Conn) CheckClosed() bool
- func (c *Conn) Close()
- func (c *Conn) GetLocalAddr() (addr string)
- func (c *Conn) GetRemoteAddr() (addr string)
- func (c *Conn) IsClosed() (closeFlag bool)
- func (c *Conn) Read(p []byte) (n int, err error)
- func (c *Conn) ReadLine() (buff string, err error)
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetTcpConn(tcpConn net.Conn)
- func (c *Conn) Write(content string) (err error)
- func (c *Conn) WriteBytes(content []byte) (n int, err error)
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct { TcpConn net.Conn Reader *bufio.Reader // contains filtered or unexported fields }
wrap for TCPConn
func (*Conn) CheckClosed ¶
when you call this function, you should make sure that remote client won't send any bytes to this socket
func (*Conn) GetLocalAddr ¶
func (*Conn) GetRemoteAddr ¶
func (*Conn) SetTcpConn ¶
if the tcpConn is different with c.TcpConn you should call c.Close() first
Click to show internal directories.
Click to hide internal directories.