bridge

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge added in v0.0.10

type Bridge struct {
	TunnelPort int //通信隧道端口

	SignalList map[int]*list       //通信
	TunnelList map[int]*list       //隧道
	RunList    map[int]interface{} //运行中的任务
	// contains filtered or unexported fields
}

func NewTunnel

func NewTunnel(tunnelPort int, runList map[int]interface{}) *Bridge

func (*Bridge) DelClientSignal added in v0.0.10

func (s *Bridge) DelClientSignal(id int)

删除通信通道

func (*Bridge) DelClientTunnel added in v0.0.10

func (s *Bridge) DelClientTunnel(id int)

删除隧道

func (*Bridge) GetSignal added in v0.0.10

func (s *Bridge) GetSignal(id int) (err error, conn *utils.Conn)

得到一个通信通道

func (*Bridge) GetTunnel added in v0.0.10

func (s *Bridge) GetTunnel(id int, en, de int, crypt, mux bool) (c *utils.Conn, err error)

得到一个tcp隧道

func (*Bridge) ReturnSignal added in v0.0.10

func (s *Bridge) ReturnSignal(conn *utils.Conn, id int)

重回slice 复用

func (*Bridge) ReturnTunnel added in v0.0.10

func (s *Bridge) ReturnTunnel(conn *utils.Conn, id int)

重回slice 复用

func (*Bridge) StartTunnel added in v0.0.10

func (s *Bridge) StartTunnel() error

Jump to

Keyboard shortcuts

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