pub struct Welcome {
pub session_id: String,
pub epoch: u32,
pub negotiated_codec: Codec,
pub negotiated_compression: Option<String>,
pub server_time: i64,
pub resume_window_ms: u32,
pub features: Vec<String>,
}Expand description
Server Welcome frame – spec §5.3.
The Welcome frame is sent by the server immediately after
successful authentication. It confirms the negotiated parameters
and assigns the session.
§Resume Window
The resume_window_ms field tells the client how long the server
will retain session state after disconnection, enabling the client
to reconnect and resume without losing messages.
Fields§
§session_id: StringUnique session identifier assigned by the server.
The client should include this value in subsequent Hello frames when attempting to resume the session.
epoch: u32Monotonically increasing epoch counter for this session.
Each new session incarnation increments the epoch. The client must echo the epoch when resuming.
negotiated_codec: CodecContent codec selected by the server from the client’s codec list.
All subsequent data frames on this connection MUST use this codec.
negotiated_compression: Option<String>Compression algorithm selected by the server, or None if no
compression is to be used.
server_time: i64Server wall-clock time in milliseconds since the Unix epoch at the moment the Welcome was generated.
The client can use this together with client_clock to estimate
round-trip time and clock skew.
resume_window_ms: u32Duration in milliseconds for which the server will retain session state after disconnection.
A value of zero means the server does not support session resumption.
features: Vec<String>List of protocol feature flags supported by the server.