Ejemplo n.º 1
0
 public virtual void Close()
 {
     lock (this)
     {
         Socket socket = this.socket;
         if (socket != null)
         {
             MalockInnetSocket.Close(socket);
         }
         this.socket = default(Socket);
     }
 }
Ejemplo n.º 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);
 }