コード例 #1
0
 /// <summary>
 /// Close and dispose the socket client handler.
 /// </summary>
 public void Dispose()
 {
     this.Close();
     if (this.receiveQueue != null)
     {
         this.receiveQueue.Dispose();
         this.receiveQueue = null;
     }
     if (this.cancellationToken != null)
     {
         this.cancellationToken.Dispose();
         this.cancellationToken = null;
     }
     if (this.socket != null)
     {
         socket.Dispose();
         socket = null;
     }
 }