Documentation ¶
Index ¶
- type ServerChannel
- func (s *ServerChannel) Addr() string
- func (s *ServerChannel) Close()
- func (s *ServerChannel) ListenKCP(config kcpcfg.KCPConfigArgs, fn func(conn net.Conn), log *logger.Logger) (err error)
- func (s *ServerChannel) ListenSingleTLS(certBytes, keyBytes, caCertBytes []byte, fn func(conn net.Conn)) (err error)
- func (s *ServerChannel) ListenTCP(fn func(conn net.Conn)) (err error)
- func (s *ServerChannel) ListenTCPS(method, password string, compress bool, fn func(conn net.Conn)) (err error)
- func (s *ServerChannel) ListenTLS(certBytes, keyBytes, caCertBytes []byte, fn func(conn net.Conn)) (err error)
- func (s *ServerChannel) ListenTOU(method, password string, compress bool, fn func(conn net.Conn)) (err error)
- func (s *ServerChannel) ListenUDP(fn func(listener *net.UDPConn, packet []byte, localAddr, srcAddr *net.UDPAddr)) (err error)
- func (s *ServerChannel) SetErrAcceptHandler(fn func(err error))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerChannel ¶
type ServerChannel struct { Listener *net.Listener UDPListener *net.UDPConn TOUServer *tou.Mux // contains filtered or unexported fields }
func NewServerChannel ¶
func NewServerChannel(ip string, port int, log *logger.Logger) ServerChannel
func NewServerChannelHost ¶
func NewServerChannelHost(host string, log *logger.Logger) ServerChannel
func (*ServerChannel) Addr ¶
func (s *ServerChannel) Addr() string
func (*ServerChannel) Close ¶
func (s *ServerChannel) Close()
func (*ServerChannel) ListenKCP ¶
func (s *ServerChannel) ListenKCP(config kcpcfg.KCPConfigArgs, fn func(conn net.Conn), log *logger.Logger) (err error)
func (*ServerChannel) ListenSingleTLS ¶
func (s *ServerChannel) ListenSingleTLS(certBytes, keyBytes, caCertBytes []byte, fn func(conn net.Conn)) (err error)
func (*ServerChannel) ListenTCP ¶
func (s *ServerChannel) ListenTCP(fn func(conn net.Conn)) (err error)
func (*ServerChannel) ListenTCPS ¶
func (*ServerChannel) ListenTLS ¶
func (s *ServerChannel) ListenTLS(certBytes, keyBytes, caCertBytes []byte, fn func(conn net.Conn)) (err error)
func (*ServerChannel) SetErrAcceptHandler ¶
func (s *ServerChannel) SetErrAcceptHandler(fn func(err error))
Click to show internal directories.
Click to hide internal directories.