Wave() public method

public Wave ( IPEndPoint facilitatorIp, int timeout, UdpClient udpClient ) : PeerInfo
facilitatorIp System.Net.IPEndPoint
timeout int
udpClient System.Net.Sockets.UdpClient
return PeerInfo
示例#1
0
 public PeerInfo Wave(IPEndPoint facilitator)
 {
     var waver = new Waver();
     _self = waver.Wave(facilitator, 10000, _udpClient);
     Logger.Debug("After wave, local endpoints are " + _self);
     if (_self.ExternalEndPoint == null)
     {
         Logger.Warn("Failed to get external endpoint : " + _self);
     }
     if (_self.EndPoints.Count == 0)
     {
         throw new Exception("Failed to determine any local endpoints : " + _self.ToString());
     }
     return _self;
 }
示例#2
0
文件: UDPTunnel.cs 项目: gwupe/Gwupe
 public PeerInfo Wave(IPEndPoint facilitator, int timeout)
 {
     _waver = new Waver();
     _self = _waver.Wave(facilitator, timeout, _udpClient);
     return _self;
 }