Beispiel #1
0
 private static void RunSyncer(string connectionId, PeerInfo peer, ITunnelEndpoint pendingTunnel, Action <ISocket> receivingMethod)
 {
     try
     {
         var activeIp = pendingTunnel.WaitForSync(peer, connectionId, GwupeClientAppContext.CurrentAppContext.SettingsManager.SyncTypes);
         Logger.Info("Successfully completed incoming tunnel with " + activeIp.Address + ":" + activeIp.Port + " [" + connectionId + "]");
         // call the callback method
         Logger.Debug("Handing over the the receiving method for this connection");
         receivingMethod(pendingTunnel);
     }
     catch (Exception ex)
     {
         ThreadPool.QueueUserWorkItem(m => GwupeClientAppContext.CurrentAppContext.SubmitFaultReport(
                                          new FaultReport()
         {
             Subject    = "P2P setup error [" + connectionId + "]",
             UserReport = "INTERNAL : Failed to sync with peer [" + connectionId + "] : " + ex.Message
         }));
         Logger.Error("Failed to sync with peer [" + peer + "] for connection " + connectionId, ex);
     }
 }
Beispiel #2
0
 private static void RunSyncer(string connectionId, PeerInfo peer, ITunnelEndpoint pendingTunnel, Action<ISocket> receivingMethod)
 {
     try
     {
         var activeIp = pendingTunnel.WaitForSync(peer, connectionId, GwupeClientAppContext.CurrentAppContext.SettingsManager.SyncTypes);
         Logger.Info("Successfully completed incoming tunnel with " + activeIp.Address + ":" + activeIp.Port + " [" + connectionId + "]");
         // call the callback method
         Logger.Debug("Handing over the the receiving method for this connection");
         receivingMethod(pendingTunnel);
     }
     catch (Exception ex)
     {
         ThreadPool.QueueUserWorkItem(m => GwupeClientAppContext.CurrentAppContext.SubmitFaultReport(
             new FaultReport()
             {
                 Subject = "P2P setup error [" + connectionId + "]",
                 UserReport = "INTERNAL : Failed to sync with peer [" + connectionId + "] : " + ex.Message
             }));
         Logger.Error("Failed to sync with peer [" + peer + "] for connection " + connectionId, ex);
     }
 }