bridge

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tunnel

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

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

func NewTunnel

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

func (*Tunnel) DelClientSignal

func (s *Tunnel) DelClientSignal(cFlag string)

删除通信通道

func (*Tunnel) DelClientTunnel

func (s *Tunnel) DelClientTunnel(cFlag string)

删除隧道

func (*Tunnel) GetSignal

func (s *Tunnel) GetSignal(cFlag string) (err error, conn *utils.Conn)

得到一个通信通道

func (*Tunnel) GetTunnel

func (s *Tunnel) GetTunnel(cFlag string, en, de int, crypt, mux bool) (c *utils.Conn, err error)

得到一个tcp隧道 TODO 超时问题 锁机制问题 对单个客户端加锁

func (*Tunnel) ReturnSignal

func (s *Tunnel) ReturnSignal(conn *utils.Conn, cFlag string)

重回slice 复用

func (*Tunnel) ReturnTunnel

func (s *Tunnel) ReturnTunnel(conn *utils.Conn, cFlag string)

重回slice 复用

func (*Tunnel) StartTunnel

func (s *Tunnel) StartTunnel() error

Jump to

Keyboard shortcuts

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