pub struct Keepalive {
pub last_received_position: u64,
pub data: BytesMut,
/* private fields */
}
Expand description
KEEPALIVE Frame (0x03)
-
Keepalive
frames MUST always use Stream ID 0 as they pertain to the Connection. -
Keepalive
frames MUST be initiated by the client and sent periodically with theFrameFlags::RESPOND
flag set. -
Keepalive
frames MAY be initiated by the server and sent upon application request with theFrameFlags::RESPOND
flag set. -
Reception of a KEEPALIVE frame with the
FrameFlags::RESPOND
flag set MUST cause a client or server to send back a KEEPALIVE with theFrameFlags::RESPOND
flag NOT set. The data in the receivedKeepalive
MUST be echoed back in the generatedKeepalive
. -
Reception of a
Keepalive
by a server indicates to the server that the client is alive. -
Reception of a
Keepalive
by a client indicates to the client that the server is alive.
§Frame Contents
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID = 0 |
+-----------+-+-+-+-------------+-------------------------------+
|Frame Type |0|0|R| Flags |
+-----------+-+-+-+-------------+-------------------------------+
|0| Last Received Position |
+ +
| |
+---------------------------------------------------------------+
Data
Fields§
§last_received_position: u64
Last Received Position: Unsigned 63-bit long of Resume Last Received Position. Value MUST be > 0.
(optional. Set to all 0s when not supported.)
data: BytesMut
Data attached to a KEEPALIVE.