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

◆ VerifyKeepAlive()

void System.Net.Http.Http2Connection.VerifyKeepAlive ( )
inlineprivate

Definition at line 3207 of file Http2Connection.cs.

3208 {
3209 if (_keepAlivePingPolicy == HttpKeepAlivePingPolicy.WithActiveRequests)
3210 {
3212 {
3213 if (_streamsInUse == 0)
3214 {
3215 return;
3216 }
3217 }
3218 }
3219 long tickCount = Environment.TickCount64;
3220 switch (_keepAliveState)
3221 {
3222 case KeepAliveState.None:
3223 if (tickCount > _nextPingRequestTimestamp)
3224 {
3229 }
3230 break;
3231 case KeepAliveState.PingSent:
3232 if (tickCount > _keepAlivePingTimeoutTimestamp)
3233 {
3235 }
3236 break;
3237 }
3238 }
volatile KeepAliveState _keepAliveState
readonly HttpKeepAlivePingPolicy _keepAlivePingPolicy
Task SendPingAsync(long pingContent, bool isAck=false)
static int Increment(ref int location)

References System.Net.Http.Http2Connection._keepAlivePingPayload, System.Net.Http.Http2Connection._keepAlivePingPolicy, System.Net.Http.Http2Connection._keepAlivePingTimeout, System.Net.Http.Http2Connection._keepAlivePingTimeoutTimestamp, System.Net.Http.Http2Connection._keepAliveState, System.Net.Http.Http2Connection._nextPingRequestTimestamp, System.Net.Http.Http2Connection._streamsInUse, System.Threading.Interlocked.Increment(), System.Net.Http.Http2Connection.SendPingAsync(), System.Net.Http.Http2Connection.SyncObject, System.Net.Http.Http2Connection.ThrowProtocolError(), and System.Environment.TickCount64.

Referenced by System.Net.Http.Http2Connection.HeartBeat().