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

◆ ProcessAuthenticationWithTelemetryAsync()

async Task System.Net.Security.SslStream.ProcessAuthenticationWithTelemetryAsync ( bool isAsync,
bool isApm,
CancellationToken cancellationToken )
inlineprivate

Definition at line 1020 of file SslStream.cs.

1021 {
1022 NetSecurityTelemetry.Log.HandshakeStart(_context.IsServer, _sslAuthenticationOptions.TargetHost);
1024 try
1025 {
1026 Task task = (isAsync ? ForceAuthenticationAsync(new AsyncReadWriteAdapter(base.InnerStream, cancellationToken), _context.IsServer, null, isApm) : ForceAuthenticationAsync(new SyncReadWriteAdapter(base.InnerStream), _context.IsServer, null));
1027 await task.ConfigureAwait(continueOnCapturedContext: false);
1028 bool connectionOpen = Interlocked.CompareExchange(ref _connectionOpenedStatus, 1, 0) == 0;
1029 NetSecurityTelemetry.Log.HandshakeCompleted(GetSslProtocolInternal(), stopwatch, connectionOpen);
1030 }
1031 catch (Exception ex)
1032 {
1033 NetSecurityTelemetry.Log.HandshakeFailed(_context.IsServer, stopwatch, ex.Message);
1034 throw;
1035 }
1036 }
SslProtocols GetSslProtocolInternal()
Definition SslStream.cs:659
SslAuthenticationOptions _sslAuthenticationOptions
Definition SslStream.cs:62
static int CompareExchange(ref int location1, int value, int comparand)
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226
static Microsoft.Extensions.Internal.ValueStopwatch StartNew()

References System.Net.Security.SslStream._connectionOpenedStatus, System.Net.Security.SslStream._context, System.Net.Security.SslStream._sslAuthenticationOptions, System.cancellationToken, System.Threading.Interlocked.CompareExchange(), System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.Net.Security.SslStream.GetSslProtocolInternal(), System.Net.Security.SecureChannel.IsServer, System.Net.Security.NetSecurityTelemetry.Log, System.Exception.Message, Microsoft.Extensions.Internal.ValueStopwatch.StartNew(), System.Net.Security.SslAuthenticationOptions.TargetHost, and System.task.

Referenced by System.Net.Security.SslStream.ProcessAuthenticationAsync().