Ejemplo n.º 1
0
 //We got request and must introduce
 private void OnNatIntroductionRequest(NatIntroduceRequestPacket req, IPEndPoint senderEndPoint)
 {
     lock (_requestEvents) {
         _requestEvents.Enqueue(new RequestEventData {
             LocalEndPoint = req.Internal, RemoteEndPoint = senderEndPoint, Token = req.Token
         });
     }
 }
Ejemplo n.º 2
0
 //We got request and must introduce
 private void OnNatIntroductionRequest(NatIntroduceRequestPacket req, IPEndPoint senderEndPoint)
 {
     if (UnsyncedEvents)
     {
         _natPunchListener.OnNatIntroductionRequest(
             req.Internal,
             senderEndPoint,
             req.Token);
     }
     else
     {
         _requestEvents.Enqueue(new RequestEventData
         {
             LocalEndPoint  = req.Internal,
             RemoteEndPoint = senderEndPoint,
             Token          = req.Token
         });
     }
 }