src/Foundation/Net/Gimela.Net.Http/Transports/ResusableNetworkStream.cs
/// <summary>
/// Releases the unmanaged resources used by the <see cref="T:System.Net.Sockets.NetworkStream"/> and optionally releases the managed resources.
/// </summary>
/// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
Releases the unmanaged resources used by the  and optionally releases the managed resources.
Releases the unmanaged resources used by the and optionally releases the managed resources .
protected override void Dispose(bool disposing)
    {
      if (_isDisposed) return;
      try
      {
        if (disposing)
        {
          if (Socket != null && Socket.Connected)
          {
            try
            {
              Socket.Disconnect(true);
            }
            catch (ObjectDisposedException) { }
          }
        }
      }
      finally
      {
        base.Dispose(disposing);
        _isDisposed = true;
      }
    }
protected override void Dispose ( bool disposing ) { if ( _isDisposed ) return ; try { if ( disposing ) { if ( Socket != null && Socket . Connected ) { try { Socket . Disconnect ( true ) ; } catch ( ObjectDisposedException ) { } } } } finally { base . Dispose ( disposing ) ; _isDisposed = true ; } }
Releases the unmanaged resources used by the  and optionally releases the managed resources.
Releases the unmanaged resources used by the and optionally releases the managed resources .
disposing
bool
None