Documentation ¶
Index ¶
- func ListenUDP(bindAddr string, bindPort int64) (conn *net.UDPConn, err error)
- type Conn
- func (c *Conn) CheckClosed() bool
- func (c *Conn) Close() error
- 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 []byte) (n int, err error)
- func (c *Conn) WriteString(content string) (err error)
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conn ¶
type Conn struct { TcpConn net.Conn Reader *bufio.Reader // contains filtered or unexported fields }
wrap for TCPConn
func ConnectServer ¶
func ConnectServerByHttpProxy ¶ added in v0.9.0
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
func (*Conn) WriteString ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.