Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IConnMgr ¶
type IConnMgr interface {
//ConnCount 当前连接数
ConnCount() int32
//Do handle connection
Do(conn net.Conn)
//SetLogger setup logger
SetLogger(logger *ulog.Logger)
}
IConnMgr interface 连接管理接口
type IMsgReader ¶
IMsgReader message handler 消息读取接口
type ISessInfo ¶
type ISessInfo interface {
//KeyOut 可打印的关键信息
KeyOut() zapcore.ObjectMarshaler
}
ISessInfo : 做调试用的信息
type MOption ¶
type MOption func(o *_SessMgrOpt)
MOption session mgr option
func WithReadTimeout ¶
WithReadTimeout : setup read timeout
func WithWriteTimeout ¶
WithWriteTimeout : setup write timeout
type Option ¶
type Option func(o *_SrvStartOpt)
Option server start option
func WithAccMaxDelay ¶
WithAccMaxDelay : setup acceptMaxDelay
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server : tcp server frame
func NewTCPSrvX ¶
func NewTCPSrvX(address string, rh IMsgReader, opts ...MOption) *Server
NewTCPSrvX : use a simple IConnMgr
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session session
Click to show internal directories.
Click to hide internal directories.