Пример #1
0
 private void ListenLoop(object unused)
 {
     while (this._isListening && !Terraria.Netplay.disconnect)
     {
         try
         {
             ISocket socket = new TemporarySynchSock(this._listener.AcceptTcpClient());
             Tools.WriteLine(socket.GetRemoteAddress() + " is connecting...");
             this._listenerCallback(socket);
         }
         catch (Exception)
         {
         }
     }
     this._listener.Stop();
 }
 private void ListenLoop(object unused)
 {
     while (this._isListening && !Terraria.Netplay.disconnect)
     {
         try
         {
             ISocket socket = new TemporarySynchSock(this._listener.AcceptTcpClient());
             Tools.WriteLine(socket.GetRemoteAddress() + " is connecting...");
             this._listenerCallback(socket);
         }
         catch (Exception)
         {
         }
     }
     this._listener.Stop();
 }