p2p

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 3, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetP2PListener

func GetP2PListener(token *models.TokenClaims) (externalUDPAddr *net.UDPAddr, listener *net.UDPConn, err error)

获取一个随机UDP Listen的内部ip,端口,外部ip端口

func SendPackToPeer

func SendPackToPeer(listener *net.UDPConn, ctrlmMsg *models.RemoteNetInfo)

client通过指定listener发送数据到explorer指定的p2p请求地址

func SendPackToPeerByReqNewP2PCtrlAsClient added in v0.0.6

func SendPackToPeerByReqNewP2PCtrlAsClient(listener *net.UDPConn, ctrlmMsg *models.ReqNewP2PCtrlAsClient)

client通过指定listener发送数据到explorer指定的p2p请求地址

func SendPackToPeerByReqNewP2PCtrlAsServer added in v0.0.6

func SendPackToPeerByReqNewP2PCtrlAsServer(listener *net.UDPConn, ctrlmMsg *models.ReqNewP2PCtrlAsServer)

client通过指定listener发送数据到explorer指定的p2p请求地址

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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