示例#1
0
 public void SendChokeMessage(bool choked)
 {
     try
     {
         if (socket.Connected)
         {
             if (!asyncInProgress)
             {
                 peerProtocol.SendChokeMessage(this.netStream, choked);
             }
             else
             {
                 this.messageQueue.Add(new object[] { PeerMessage.Choke, choked });
             }
         }
     }
     catch (System.Exception e)
     {
         Config.LogException(e);
         this.Disconnect();
     }
 }