Documentation ¶
Index ¶
- type Listener
- func (own *Listener) Close()
- func (own *Listener) IsClosed() bool
- func (own *Listener) ListenAndRun()
- func (own *Listener) WithCloseHandler(handler func()) *Listener
- func (own *Listener) WithCommandHandlers(handlers map[protocol.Command]connection.CommandHandler) *Listener
- func (own *Listener) WithPassword(pwd string) *Listener
- func (own *Listener) WithProcessHandler(handler ProcessHandler) *Listener
- type ProcessHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct { CloseHandler func() // Listener 关闭处理器,主要用于广播通知 ProcessHandler ProcessHandler // Listener 连接处理器 CommandHandlers map[protocol.Command]connection.CommandHandler // Listener 指令处理器 // contains filtered or unexported fields }
func NewListener ¶
func (*Listener) ListenAndRun ¶
func (own *Listener) ListenAndRun()
func (*Listener) WithCloseHandler ¶
func (*Listener) WithCommandHandlers ¶
func (own *Listener) WithCommandHandlers(handlers map[protocol.Command]connection.CommandHandler) *Listener
func (*Listener) WithPassword ¶
func (*Listener) WithProcessHandler ¶
func (own *Listener) WithProcessHandler(handler ProcessHandler) *Listener
Click to show internal directories.
Click to hide internal directories.