Example #1
0
 protected override void AcceptCallback(IAsyncResult ar)
 {
     try
     {
         Socket localSocket = ListenerSocket.EndAccept(ar);
         if (localSocket != null)
         {
             var client = new SocksClient(localSocket, Subscribe, Remove, AuthCallback);
             client.StartHandshake();
         }
     }
     catch
     {}
     try
     {
         ListenerSocket.BeginAccept(AcceptCallback, null);
     }
     catch
     {
         Dispose();
     }
 }
Example #2
0
 protected override void AcceptCallback(IAsyncResult ar)
 {
     try
     {
         Socket localSocket = ListenerSocket.EndAccept(ar);
         if(localSocket != null)
         {
             var client = new SocksClient(localSocket, Subscribe, Remove, AuthCallback);
             client.StartHandshake();
         }
     }
     catch
     {}
     try
     {
         ListenerSocket.BeginAccept(AcceptCallback, null);
     }
     catch
     {
         Dispose();
     }
 }