server

package
v0.0.0-...-5fb5acb Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CurrentClientList   map[string]CurrentClient
	CurrentClientIdList map[string]int

	TcpServerBool = true
	PongServer    net.Listener
	ScriptFile    string
)

Functions

func Connect

func Connect(conn *net.UDPConn, remote *net.UDPAddr, client ClientConfig)

func MessageTypeController

func MessageTypeController(conn *net.UDPConn, message []byte, rlen int, remote *net.UDPAddr)

func Pong

func Pong(port int)

func PongHandleRequest

func PongHandleRequest(conn net.Conn)

Handles incoming requests.

func Shutdown

func Shutdown() int

func Start

func Start()

func Whoami

func Whoami(conn *net.UDPConn, remote *net.UDPAddr)

Types

type ClientConfig

type ClientConfig struct {
	MTU        int
	ClientName string
	ClientKey  string
}

func Parse

func Parse(configPath string) ([]ClientConfig, error)

type Config

type Config struct {
	PORT string
	IP   string
}

type CurrentClient

type CurrentClient struct {
	IP   string
	PORT int
}

Jump to

Keyboard shortcuts

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