public virtual void Close()
 {
     lock (this)
     {
         Socket socket = this.socket;
         if (socket != null)
         {
             MalockInnetSocket.Close(socket);
         }
         this.socket = default(Socket);
     }
 }
示例#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);
 }