protected override void IntEndWrite(IAsyncResult ar) { try { this.fSslStream.EndWrite(ar); } catch (IOException) { // SocketException is expected in all code that deals with Connection, not IOException throw new SocketException(); } } }