core

package
v0.0.0-...-a8e6978 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectFunc

type ConnectFunc func(addr net.Addr, auth []byte, sSend uint64, sRecv uint64) (bool, int)

type DisconnectFunc

type DisconnectFunc func(addr net.Addr, userId int, err error)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(tlsConfig *tls.Config, quicConfig *quic.Config,
	pktConn net.PacketConn, transport *transport.ServerTransport,
	sendBPS uint64, recvBPS uint64, disableUDP bool, userService *service.UsersService,
	connectFunc ConnectFunc, disconnectFunc DisconnectFunc,
	tcpRequestFunc TCPRequestFunc, tcpErrorFunc TCPErrorFunc,
	udpRequestFunc UDPRequestFunc, udpErrorFunc UDPErrorFunc,
) (*Server, error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) Serve

func (s *Server) Serve() error

type TCPErrorFunc

type TCPErrorFunc func(addr net.Addr, userId int, reqAddr string, err error)

type TCPRequestFunc

type TCPRequestFunc func(addr net.Addr, userId int, reqAddr string)

type UDPErrorFunc

type UDPErrorFunc func(addr net.Addr, userId int, sessionID uint32, err error)

type UDPRequestFunc

type UDPRequestFunc func(addr net.Addr, userId int, sessionID uint32)

Jump to

Keyboard shortcuts

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