udpTunnel

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: BSD-3-Clause Imports: 12 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

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

func (*Tunnel) OnInitComplete

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

func (*Tunnel) OnOpened

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

func (*Tunnel) OnShutdown

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

func (*Tunnel) PreWrite

func (t *Tunnel) PreWrite()

func (*Tunnel) React

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

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