Documentation ¶
Index ¶
- func NewTCPServer(host string, handle func(net.Conn)) (server.Server, error)
- func NewUDPServer(host string, opt ...func(u *udpOpt)) (server.Server, error)
- func UDPWithHandle(f func(req io.Reader) (resp io.ReadCloser, err error)) func(u *udpOpt)
- func UDPWithListenConfig(n net.ListenConfig) func(u *udpOpt)
- func UDPWithListenFunc(f func(net.PacketConn) error) func(u *udpOpt)
- type EmptyServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTCPServer ¶
NewTCPServer create new TCP listener
func UDPWithHandle ¶
func UDPWithHandle(f func(req io.Reader) (resp io.ReadCloser, err error)) func(u *udpOpt)
func UDPWithListenConfig ¶
func UDPWithListenConfig(n net.ListenConfig) func(u *udpOpt)
func UDPWithListenFunc ¶
func UDPWithListenFunc(f func(net.PacketConn) error) func(u *udpOpt)
Types ¶
type EmptyServer ¶
type EmptyServer struct{}
func (*EmptyServer) Addr ¶
func (e *EmptyServer) Addr() net.Addr
func (*EmptyServer) Close ¶
func (e *EmptyServer) Close() error
Click to show internal directories.
Click to hide internal directories.