Documentation
¶
Index ¶
- func NewServer(opts ...ServerOption) inet.SocketServer
- type ServerOption
- func WithServerEnableHeartbeatCheck(enable bool) ServerOption
- func WithServerHeartbeatInterval(heartbeatInterval time.Duration) ServerOption
- func WithServerListenAddr(addr string) ServerOption
- func WithServerMaxConnNum(maxConnNum int) ServerOption
- func WithServerMaxMsgLen(maxMsgLen int) ServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(opts ...ServerOption) inet.SocketServer
Types ¶
type ServerOption ¶
type ServerOption func(o *serverOptions)
func WithServerEnableHeartbeatCheck ¶
func WithServerEnableHeartbeatCheck(enable bool) ServerOption
WithServerEnableHeartbeatCheck 是否启用心跳检测
func WithServerHeartbeatInterval ¶
func WithServerHeartbeatInterval(heartbeatInterval time.Duration) ServerOption
WithServerHeartbeatInterval 设置心跳检测间隔时间
func WithServerListenAddr ¶
func WithServerListenAddr(addr string) ServerOption
WithServerListenAddr 设置监听地址
func WithServerMaxConnNum ¶
func WithServerMaxConnNum(maxConnNum int) ServerOption
WithServerMaxConnNum 设置连接的最大连接数
func WithServerMaxMsgLen ¶
func WithServerMaxMsgLen(maxMsgLen int) ServerOption
WithServerMaxMsgLen 设置消息最大长度
Click to show internal directories.
Click to hide internal directories.