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)
175heartBeatIntervalMs = _keepAlivePingState.HeartBeatIntervalMs; 179NetEventSource.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(); 1021if (_keepAlivePingState?.Exception is not null) 1026new AggregateException(_keepAlivePingState.Exception, exc)); 1185bool processPong = header.Opcode == MessageOpcode.Pong && _keepAlivePingState is not null 1212_keepAlivePingState!.OnPongResponseReceived(pongPayload); 1609_keepAlivePingState?.OnDataReceived(); 1739if (_keepAlivePingState is not null) 1746keepAliveException = _keepAlivePingState.Exception;
System\Net\WebSockets\ManagedWebSocket.KeepAlive.cs (14)
14private bool IsUnsolicitedPongKeepAlive => _keepAlivePingState is null; 53Debug.Assert(_keepAlivePingState != null); 64if (_keepAlivePingState.Exception is not null) 66if (NetEventSource.Log.IsEnabled()) NetEventSource.Trace(this, $"KeepAlive already faulted, skipping... (exception: {_keepAlivePingState.Exception.Message})"); 72if (_keepAlivePingState.PingSent) 74if (now > _keepAlivePingState.PingTimeoutTimestamp) 78NetEventSource.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 90if (now > _keepAlivePingState.NextPingRequestTimestamp) 92_keepAlivePingState.OnNextPingRequestCore(); // we are holding the lock 94pingPayload = _keepAlivePingState.PingPayload; 109_keepAlivePingState.OnKeepAliveFaulted(e); 115Debug.Assert(_keepAlivePingState != null);