listener

package
v0.0.0-...-edd3e93 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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 NewListener(host string) *Listener

func (*Listener) Close

func (own *Listener) Close()

func (*Listener) IsClosed

func (own *Listener) IsClosed() bool

func (*Listener) ListenAndRun

func (own *Listener) ListenAndRun()

func (*Listener) WithCloseHandler

func (own *Listener) WithCloseHandler(handler func()) *Listener

func (*Listener) WithCommandHandlers

func (own *Listener) WithCommandHandlers(handlers map[protocol.Command]connection.CommandHandler) *Listener

func (*Listener) WithPassword

func (own *Listener) WithPassword(pwd string) *Listener

func (*Listener) WithProcessHandler

func (own *Listener) WithProcessHandler(handler ProcessHandler) *Listener

type ProcessHandler

type ProcessHandler func(proto *protocol.Procotol, conn net.Conn)

tester -t 0 -T 100 -a 3625 -l 1200 -f 999999999 -d

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL