bridge

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2019 License: MIT Imports: 11 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 //通信隧道端口

	Client  map[int]*Client
	RunList map[int]interface{} //运行中的任务
	// contains filtered or unexported fields
}

func NewTunnel

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

func (*Bridge) DelClient added in v0.0.12

func (s *Bridge) DelClient(id int)

删除通信通道

func (*Bridge) GetSignal added in v0.0.10

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

得到一个通信通道

func (*Bridge) GetStatus added in v0.0.12

func (s *Bridge) GetStatus(clientId int)

func (*Bridge) GetTunnel added in v0.0.10

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

得到一个tcp隧道

func (*Bridge) SendLinkInfo added in v0.0.12

func (s *Bridge) SendLinkInfo(clientId int, link *conn.Link) (tunnel *conn.Conn, err error)

func (*Bridge) StartTunnel added in v0.0.10

func (s *Bridge) StartTunnel() error

type Client added in v0.0.12

type Client struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewClient added in v0.0.14

func NewClient(t *conn.Conn, s *conn.Conn) *Client

Jump to

Keyboard shortcuts

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