peer

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientPeer

type ClientPeer struct {
	Peer
}

func NewClientPeer

func NewClientPeer(tunnelNum int, endpoint string, cipher tunnel.Cipher) ClientPeer

func (*ClientPeer) Dial

func (cp *ClientPeer) Dial(address string) connection.Connection

type Peer

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

func (*Peer) Stop

func (p *Peer) Stop()

type PeerGroup

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

func NewPeerGroup

func NewPeerGroup(cipher tunnel.Cipher) PeerGroup

func (*PeerGroup) AddTunnel

func (pg *PeerGroup) AddTunnel(tunnel *tunnel_pool.Tunnel) error

Add a tunnel to it's peer; will create peer if not exists

func (*PeerGroup) AddTunnelFromConn

func (pg *PeerGroup) AddTunnelFromConn(conn net.Conn) error

Like AddTunnel, add a raw connection

func (*PeerGroup) RemovePeer

func (pg *PeerGroup) RemovePeer(peerID uint32)

type ServerPeer

type ServerPeer struct {
	Peer
}

func NewServerPeerWithID

func NewServerPeerWithID(peerID uint32, peerContext context.Context, removePeerFunc context.CancelFunc) ServerPeer

Jump to

Keyboard shortcuts

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