server

package
v0.0.0-...-198281b Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

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 (s *ServerChannel) ListenTCPS(method, password string, compress bool, fn func(conn net.Conn)) (err error)

func (*ServerChannel) ListenTLS

func (s *ServerChannel) ListenTLS(certBytes, keyBytes, caCertBytes []byte, fn func(conn net.Conn)) (err error)

func (*ServerChannel) ListenTOU

func (s *ServerChannel) ListenTOU(method, password string, compress bool, fn func(conn net.Conn)) (err error)

func (*ServerChannel) ListenUDP

func (s *ServerChannel) ListenUDP(fn func(listener *net.UDPConn, packet []byte, localAddr, srcAddr *net.UDPAddr)) (err error)

func (*ServerChannel) SetErrAcceptHandler

func (s *ServerChannel) SetErrAcceptHandler(fn func(err error))

Jump to

Keyboard shortcuts

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