Documentation ¶
Index ¶
- Variables
- func NewMemAreaPool() *memAreaPool
- type Agent
- type CAFile
- type Conn
- type ConnSet
- type HttpServer
- type INetMempool
- type MsgParser
- type TCPClient
- type TCPConn
- func (tcpConn *TCPConn) Close()
- func (tcpConn *TCPConn) Destroy()
- func (tcpConn *TCPConn) GetRemoteIp() string
- func (tcpConn *TCPConn) IsConnected() bool
- func (tcpConn *TCPConn) LocalAddr() net.Addr
- func (tcpConn *TCPConn) Read(b []byte) (int, error)
- func (tcpConn *TCPConn) ReadMsg() ([]byte, error)
- func (tcpConn *TCPConn) ReleaseReadMsg(byteBuff []byte)
- func (tcpConn *TCPConn) RemoteAddr() net.Addr
- func (tcpConn *TCPConn) SetReadDeadline(d time.Duration)
- func (tcpConn *TCPConn) SetWriteDeadline(d time.Duration)
- func (tcpConn *TCPConn) Write(b []byte) error
- func (tcpConn *TCPConn) WriteMsg(args ...[]byte) error
- func (tcpConn *TCPConn) WriteRawMsg(args []byte) error
- type TCPServer
- type WSClient
- type WSConn
- type WSHandler
- type WSServer
- type WebsocketConnSet
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMaxHeaderBytes int = 1 << 20
Functions ¶
func NewMemAreaPool ¶
func NewMemAreaPool() *memAreaPool
Types ¶
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func (*HttpServer) SetCAFile ¶
func (slf *HttpServer) SetCAFile(caFile []CAFile)
func (*HttpServer) Start ¶
func (slf *HttpServer) Start()
type INetMempool ¶
type MsgParser ¶
type MsgParser struct { INetMempool // contains filtered or unexported fields }
-------------- | len | data | --------------
func NewMsgParser ¶
func NewMsgParser() *MsgParser
func (*MsgParser) SetByteOrder ¶
It's dangerous to call the method on reading or writing
type TCPClient ¶
type TCPConn ¶
func (*TCPConn) GetRemoteIp ¶
func (*TCPConn) IsConnected ¶
func (*TCPConn) ReleaseReadMsg ¶
func (*TCPConn) RemoteAddr ¶
func (*TCPConn) SetReadDeadline ¶
func (*TCPConn) SetWriteDeadline ¶
func (*TCPConn) WriteRawMsg ¶
type TCPServer ¶
type TCPServer struct { Addr string MaxConnNum int PendingWriteNum int NewAgent func(*TCPConn) Agent // msg parser LenMsgLen int MinMsgLen uint32 MaxMsgLen uint32 LittleEndian bool // contains filtered or unexported fields }
func (*TCPServer) GetNetMempool ¶
func (server *TCPServer) GetNetMempool() INetMempool
func (*TCPServer) SetNetMempool ¶
func (server *TCPServer) SetNetMempool(mempool INetMempool)
type WSClient ¶
type WSConn ¶
func (*WSConn) RemoteAddr ¶
type WSServer ¶
type WebsocketConnSet ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.