1 write to _keepAlivePingState
System.Net.WebSockets (1)
System\Net\WebSockets\ManagedWebSocket.cs (1)
174
_keepAlivePingState
= new KeepAlivePingState(keepAliveInterval, keepAliveTimeout, this);
26 references to _keepAlivePingState
System.Net.WebSockets (26)
System\Net\WebSockets\ManagedWebSocket.cs (12)
175
heartBeatIntervalMs =
_keepAlivePingState
.HeartBeatIntervalMs;
179
NetEventSource.Associate(this,
_keepAlivePingState
);
182
$"Enabling Ping/Pong Keep-Alive strategy: ping delay={
_keepAlivePingState
.DelayMs}ms, timeout={
_keepAlivePingState
.TimeoutMs}ms, heartbeat={heartBeatIntervalMs}ms");
953
_keepAlivePingState
?.OnDataReceived();
1021
if (
_keepAlivePingState
?.Exception is not null)
1026
new AggregateException(
_keepAlivePingState
.Exception, exc));
1185
bool processPong = header.Opcode == MessageOpcode.Pong &&
_keepAlivePingState
is not null
1212
_keepAlivePingState
!.OnPongResponseReceived(pongPayload);
1609
_keepAlivePingState
?.OnDataReceived();
1739
if (
_keepAlivePingState
is not null)
1746
keepAliveException =
_keepAlivePingState
.Exception;
System\Net\WebSockets\ManagedWebSocket.KeepAlive.cs (14)
14
private bool IsUnsolicitedPongKeepAlive =>
_keepAlivePingState
is null;
53
Debug.Assert(
_keepAlivePingState
!= null);
64
if (
_keepAlivePingState
.Exception is not null)
66
if (NetEventSource.Log.IsEnabled()) NetEventSource.Trace(this, $"KeepAlive already faulted, skipping... (exception: {
_keepAlivePingState
.Exception.Message})");
72
if (
_keepAlivePingState
.PingSent)
74
if (now >
_keepAlivePingState
.PingTimeoutTimestamp)
78
NetEventSource.Trace(this, $"Keep-alive ping timed out after {
_keepAlivePingState
.TimeoutMs}ms. Expected pong with payload {
_keepAlivePingState
.PingPayload}");
84
_keepAlivePingState
.OnKeepAliveFaultedCore(exc); // we are holding the lock
90
if (now >
_keepAlivePingState
.NextPingRequestTimestamp)
92
_keepAlivePingState
.OnNextPingRequestCore(); // we are holding the lock
94
pingPayload =
_keepAlivePingState
.PingPayload;
109
_keepAlivePingState
.OnKeepAliveFaulted(e);
115
Debug.Assert(
_keepAlivePingState
!= null);