Documentation ¶
Index ¶
- func GetP2PListener(token *models.TokenClaims) (externalUDPAddr *net.UDPAddr, listener *net.UDPConn, err error)
- func SendPackToPeer(listener *net.UDPConn, ctrlmMsg *models.RemoteNetInfo)
- func SendPackToPeerByReqNewP2PCtrlAsClient(listener *net.UDPConn, ctrlmMsg *models.ReqNewP2PCtrlAsClient)
- func SendPackToPeerByReqNewP2PCtrlAsServer(listener *net.UDPConn, ctrlmMsg *models.ReqNewP2PCtrlAsServer)
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.
Click to show internal directories.
Click to hide internal directories.