Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CloseInternal()

void System.Net.Security.SslStream.CloseInternal ( )
inlineprivate

Definition at line 967 of file SslStream.cs.

968 {
970 _context?.Close();
971 if (Interlocked.CompareExchange(ref _nestedRead, 1, 0) == 0)
972 {
973 byte[] internalBuffer = _internalBuffer;
974 if (internalBuffer != null)
975 {
976 _internalBuffer = null;
978 _internalOffset = 0;
979 ArrayPool<byte>.Shared.Return(internalBuffer);
980 }
981 }
982 if (_internalBuffer == null)
983 {
984 GC.SuppressFinalize(this);
985 }
986 if (NetSecurityTelemetry.Log.IsEnabled() && Interlocked.Exchange(ref _connectionOpenedStatus, 2) == 1)
987 {
988 NetSecurityTelemetry.Log.ConnectionClosed(GetSslProtocolInternal());
989 }
990 }
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
static readonly ExceptionDispatchInfo s_disposedSentinel
Definition SslStream.cs:26
ExceptionDispatchInfo _exception
Definition SslStream.cs:42
SslProtocols GetSslProtocolInternal()
Definition SslStream.cs:659
static int CompareExchange(ref int location1, int value, int comparand)
static int Exchange(ref int location1, int value)

References System.Net.Security.SslStream._connectionOpenedStatus, System.Net.Security.SslStream._context, System.Net.Security.SslStream._exception, System.Net.Security.SslStream._internalBuffer, System.Net.Security.SslStream._internalBufferCount, System.Net.Security.SslStream._internalOffset, System.Net.Security.SslStream._nestedRead, System.Net.Security.SecureChannel.Close(), System.Threading.Interlocked.CompareExchange(), System.Threading.Interlocked.Exchange(), System.Net.Security.SslStream.GetSslProtocolInternal(), System.Net.Security.NetSecurityTelemetry.Log, System.Net.Security.SslStream.s_disposedSentinel, System.Buffers.ArrayPool< T >.Shared, and System.GC.SuppressFinalize().

Referenced by System.Net.Security.SslStream.Dispose(), and System.Net.Security.SslStream.DisposeAsync().