server

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NmProxyServer - proxy server for global access
	NmProxyServer = &ProxyServer{}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Port     int
	BodySize int
}

Config - struct for proxy server config

type ProxyServer

type ProxyServer struct {
	Config Config
	Server *net.UDPConn
}

ProxyServer - struct for proxy server

func (*ProxyServer) Close

func (p *ProxyServer) Close()

ProxyServer.Close - closes the proxy server

func (*ProxyServer) CreateProxyServer

func (p *ProxyServer) CreateProxyServer(port, bodySize int, addr string) (err error)

ProxyServer.CreateProxyServer - creats a proxy listener port - port for proxy to listen on localhost bodySize - leave 0 to use default addr - the address for proxy to listen on

func (*ProxyServer) KeepAlive

func (p *ProxyServer) KeepAlive(ip string, port int)

func (*ProxyServer) Listen

func (p *ProxyServer) Listen(ctx context.Context)

Proxy.Listen - begins listening for packets

Jump to

Keyboard shortcuts

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