Documentation ¶
Index ¶
- func GetDialIpPort(token *models.TokenClaims) (localAddr, externalAddr *net.UDPAddr, err error)
- func GetNewListener(oldListener *net.UDPConn) (newListener *net.UDPConn, err error)
- func GetP2PListener(token *models.TokenClaims) (externalUDPAddr *net.UDPAddr, listener *net.UDPConn, err error)
- func SendPackToPeerByRemoteNetInfo(listener *net.UDPConn, ctrlmMsg *models.RemoteNetInfo)
- func SendPackToPeerByReqNewP2PCtrlAsClient(listener *net.UDPConn, ctrlmMsg *models.ReqNewP2PCtrlAsClient)
- func SendPackToPeerByReqNewP2PCtrlAsServer(listener *net.UDPConn, ctrlmMsg *models.ReqNewP2PCtrlAsServer)
- func SendPackToPeerByUDPAddr(listener *net.UDPConn, raddr *net.UDPAddr)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDialIpPort ¶ added in v0.0.14
func GetDialIpPort(token *models.TokenClaims) (localAddr, externalAddr *net.UDPAddr, err error)
获取一个随机UDP Dial的内部ip,端口,外部ip端口
func GetNewListener ¶ added in v0.0.16
把旧的Listener关闭创建一个新的Listener返回,本地地址相同
func GetP2PListener ¶
func GetP2PListener(token *models.TokenClaims) (externalUDPAddr *net.UDPAddr, listener *net.UDPConn, err error)
获取一个随机UDP Listen的内部ip,端口,外部ip端口
func SendPackToPeerByRemoteNetInfo ¶ added in v0.0.13
func SendPackToPeerByRemoteNetInfo(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.