pub struct Keepalive {
pub last_received_position: u64,
pub data: BytesMut,
/* private fields */
}Expand description
KEEPALIVE Frame (0x03)
-
Keepaliveframes MUST always use Stream ID 0 as they pertain to the Connection. -
Keepaliveframes MUST be initiated by the client and sent periodically with theFrameFlags::RESPONDflag set. -
Keepaliveframes MAY be initiated by the server and sent upon application request with theFrameFlags::RESPONDflag set. -
Reception of a KEEPALIVE frame with the
FrameFlags::RESPONDflag set MUST cause a client or server to send back a KEEPALIVE with theFrameFlags::RESPONDflag NOT set. The data in the receivedKeepaliveMUST be echoed back in the generatedKeepalive. -
Reception of a
Keepaliveby a server indicates to the server that the client is alive. -
Reception of a
Keepaliveby 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 |
+ +
| |
+---------------------------------------------------------------+
DataFields§
§last_received_position: u64Last Received Position: Unsigned 63-bit long of Resume Last Received Position. Value MUST be > 0.
(optional. Set to all 0s when not supported.)
data: BytesMutData attached to a KEEPALIVE.