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

◆ SendPingAsync()

Task System.Net.Http.Http2Connection.SendPingAsync ( long pingContent,
bool isAck = false )
inlineprivate

Definition at line 2583 of file Http2Connection.cs.

2584 {
2585 return PerformWriteAsync(17, (this, pingContent, isAck), delegate((Http2Connection thisRef, long pingContent, bool isAck) state, Memory<byte> writeBuffer)
2586 {
2587 if (System.Net.NetEventSource.Log.IsEnabled())
2588 {
2589 state.thisRef.Trace($"Started writing. {"pingContent"}={state.pingContent}", "SendPingAsync");
2590 }
2591 Span<byte> span = writeBuffer.Span;
2592 FrameHeader.WriteTo(span, 8, FrameType.Ping, state.isAck ? FrameFlags.EndStream : FrameFlags.None, 0);
2593 BinaryPrimitives.WriteInt64BigEndian(span.Slice(9), state.pingContent);
2594 return true;
2595 });
2596 }
static void WriteInt64BigEndian(Span< byte > destination, long value)
Http2Connection(HttpConnectionPool pool, Stream stream)
static readonly System.Net.NetEventSource Log

References System.Net.NetEventSource.Log, System.state, System.Buffers.Binary.BinaryPrimitives.WriteInt64BigEndian(), and System.Net.Http.Http2Connection.FrameHeader.WriteTo().

Referenced by System.Net.Http.Http2Connection.RttEstimator.OnDataOrHeadersReceived(), System.Net.Http.Http2Connection.ProcessPingFrame(), and System.Net.Http.Http2Connection.VerifyKeepAlive().