pub enum SessionCommand {
Send(Vec<u8>),
SendStreamReliable {
stream_id: u32,
data: Bytes,
},
SendStreamUnreliable {
stream_id: u32,
data: Bytes,
},
CloseStream {
stream_id: u32,
},
Migrate(String),
MigrateServer(String),
Close,
}std only.Expand description
Commands for the background session task
Variants§
Send(Vec<u8>)
Queue data for sending
SendStreamReliable
Send data on a specific stream reliably
SendStreamUnreliable
Send data on a specific stream unreliably
CloseStream
Close a specific stream
Migrate(String)
Migrate to a new local address (Phase 4 / P4.2 — embedder-triggered). Carries
the new local bind address as a String; the pump rebinds the transport and
bumps the send path_id (best-effort, never fatal to the session).
MigrateServer(String)
Migrate the SERVER’s send path to a new local address (Rust-only, the server-side
mirror of Migrate). Carries the new local bind address as a
String; the pump rebinds the server’s send socket (its receive keeps flowing on
the old address via the listener demux during the overlap) and rotates the s2c send
path_id + outbound CID in lock-step, so the client sees — and follows — a fresh
server source with a fresh, unlinkable ConnId. Best-effort, never fatal.
Close
Close the session