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