Documentation
¶
Index ¶
- type Agent
- type Conn
- type PkgParser
- type Processor
- type TCPClient
- type TCPConn
- func (c *TCPConn) Close()
- func (c *TCPConn) Destroy()
- func (c *TCPConn) LocalAddr() net.Addr
- func (c *TCPConn) Read(p []byte) (n int, err error)
- func (c *TCPConn) ReadMsg() ([]byte, error)
- func (c *TCPConn) RemoteAddr() net.Addr
- func (c *TCPConn) Write(p []byte) (n int, err error)
- func (c *TCPConn) WriteMsg(args ...[]byte) error
- type TCPServer
- type WSClient
- type WSConn
- type WSHandler
- type WSServer
- type WebsocketConnSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PkgParser ¶
type PkgParser struct {
// contains filtered or unexported fields
}
-------------- | len | data | --------------
func NewPkgParser ¶
func NewPkgParser() *PkgParser
type TCPClient ¶
type TCPClient struct {
sync.Mutex
Addr string
ConnNum int
ConnectInterval time.Duration // 连接失败后的重连时间间隔
PendingWriteNum int // 发送消息队列缓冲区长度
AutoReconnect bool
NewAgent func(conn *TCPConn) Agent
// PkgParser
ByteLen int
MinPkgLen uint32
MaxPkgLen uint32
LittleEndian bool
// contains filtered or unexported fields
}
type TCPConn ¶
type TCPConn struct {
// contains filtered or unexported fields
}
func (*TCPConn) RemoteAddr ¶
type TCPServer ¶
type WSClient ¶
type WSConn ¶
type WSConn struct {
// contains filtered or unexported fields
}
func (*WSConn) RemoteAddr ¶
type WSServer ¶
type WebsocketConnSet ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.