udpTunnel

package
v0.5.20 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerID      string
	Concurrency   int
	ListenAddress string
	MaxBodySize   int
	ExternalAddrs []string
}

Config

type Tunnel

type Tunnel struct {
	tunnel.MessageHandler
	// contains filtered or unexported fields
}

Tunnel

func New

func New(config Config) (*Tunnel, error)

func (*Tunnel) Addr

func (t *Tunnel) Addr() []string

func (*Tunnel) OnClosed added in v0.5.20

func (t *Tunnel) OnClosed(c gnet.Conn, err error) (action gnet.Action)

func (*Tunnel) OnInitComplete added in v0.5.20

func (t *Tunnel) OnInitComplete(server gnet.Server) (action gnet.Action)

func (*Tunnel) OnOpened added in v0.5.20

func (t *Tunnel) OnOpened(c gnet.Conn) (out []byte, action gnet.Action)

func (*Tunnel) OnShutdown added in v0.5.20

func (t *Tunnel) OnShutdown(server gnet.Server)

func (*Tunnel) PreWrite added in v0.5.20

func (t *Tunnel) PreWrite()

func (*Tunnel) React added in v0.5.20

func (t *Tunnel) React(frame []byte, c gnet.Conn) (out []byte, action gnet.Action)

func (*Tunnel) Run

func (t *Tunnel) Run()

func (*Tunnel) Shutdown

func (t *Tunnel) Shutdown()

func (*Tunnel) Start

func (t *Tunnel) Start()

func (*Tunnel) Tick added in v0.5.20

func (t *Tunnel) Tick() (delay time.Duration, action gnet.Action)

Jump to

Keyboard shortcuts

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