public virtual void Close()
 {
     lock (this)
     {
         Socket socket = this.socket;
         if (socket != null)
         {
             MalockInnetSocket.Close(socket);
         }
         this.socket = default(Socket);
     }
 }
Example #2
0
 private void ProcessAborted()
 {
     lock (this.syncobj)
     {
         Socket socket = this.socket;
         if (socket != null)
         {
             MalockInnetSocket.Close(socket);
         }
         this.connected = false;
     }
     this.OnAborted(EventArgs.Empty);
 }