Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ HandshakeCompleted()

void System.Net.Security.NetSecurityTelemetry.HandshakeCompleted ( SslProtocols protocol,
ValueStopwatch stopwatch,
bool connectionOpen )
inline

Definition at line 208 of file NetSecurityTelemetry.cs.

209 {
211 long num = 0L;
212 ref long location = ref num;
213 EventCounter eventCounter = null;
214 switch (protocol)
215 {
216 case SslProtocols.Tls:
217 location = ref _sessionsOpenTls10;
218 eventCounter = _handshakeDurationTls10Counter;
219 break;
220 case SslProtocols.Tls11:
221 location = ref _sessionsOpenTls11;
222 eventCounter = _handshakeDurationTls11Counter;
223 break;
224 case SslProtocols.Tls12:
225 location = ref _sessionsOpenTls12;
226 eventCounter = _handshakeDurationTls12Counter;
227 break;
228 case SslProtocols.Tls13:
229 location = ref _sessionsOpenTls13;
230 eventCounter = _handshakeDurationTls13Counter;
231 break;
232 }
233 if (connectionOpen)
234 {
235 Interlocked.Increment(ref location);
237 }
238 double totalMilliseconds = stopwatch.GetElapsedTime().TotalMilliseconds;
239 eventCounter?.WriteMetric(totalMilliseconds);
240 _handshakeDurationCounter.WriteMetric(totalMilliseconds);
241 HandshakeStop(protocol);
242 }
static int Increment(ref int location)

References System.Net.Security.NetSecurityTelemetry._finishedTlsHandshakes, System.Net.Security.NetSecurityTelemetry._handshakeDurationCounter, System.Net.Security.NetSecurityTelemetry._handshakeDurationTls10Counter, System.Net.Security.NetSecurityTelemetry._handshakeDurationTls11Counter, System.Net.Security.NetSecurityTelemetry._handshakeDurationTls12Counter, System.Net.Security.NetSecurityTelemetry._handshakeDurationTls13Counter, System.Net.Security.NetSecurityTelemetry._sessionsOpen, System.Net.Security.NetSecurityTelemetry._sessionsOpenTls10, System.Net.Security.NetSecurityTelemetry._sessionsOpenTls11, System.Net.Security.NetSecurityTelemetry._sessionsOpenTls12, System.Net.Security.NetSecurityTelemetry._sessionsOpenTls13, Microsoft.Extensions.Internal.ValueStopwatch.GetElapsedTime(), System.Net.Security.NetSecurityTelemetry.HandshakeStop(), System.Threading.Interlocked.Increment(), System.L, and System.Diagnostics.Tracing.EventCounter.WriteMetric().