nathole

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NatHoleTimeout int64 = 10

Timeout seconds.

Functions

This section is empty.

Types

type NatHoleClientCfg

type NatHoleClientCfg struct {
	Name  string
	Sk    string
	SidCh chan string
}

type NatHoleController

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

func NewNatHoleController

func NewNatHoleController(udpBindAddr string) (nc *NatHoleController, err error)

func (*NatHoleController) CloseClient

func (nc *NatHoleController) CloseClient(name string)

func (*NatHoleController) GenNatHoleResponse

func (nc *NatHoleController) GenNatHoleResponse(session *NatHoleSession, errInfo string) []byte

func (*NatHoleController) GenSid

func (nc *NatHoleController) GenSid() string

func (*NatHoleController) HandleClient

func (nc *NatHoleController) HandleClient(m *msg.NatHoleClient, raddr *net.UDPAddr)

func (*NatHoleController) HandleVisitor

func (nc *NatHoleController) HandleVisitor(m *msg.NatHoleVisitor, raddr *net.UDPAddr)

func (*NatHoleController) ListenClient

func (nc *NatHoleController) ListenClient(name string, sk string) (sidCh chan string)

func (*NatHoleController) Run

func (nc *NatHoleController) Run()

type NatHoleSession

type NatHoleSession struct {
	Sid         string
	VisitorAddr *net.UDPAddr
	ClientAddr  *net.UDPAddr

	NotifyCh chan struct{}
}

Jump to

Keyboard shortcuts

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