Add reliable stream retransmission
This commit is contained in:
+5
-1
@@ -38,12 +38,14 @@ pub fn is_implicit_session_name(name: &str) -> bool {
|
||||
}
|
||||
|
||||
pub const MAGIC: &[u8; 4] = b"DOSH";
|
||||
// v4: added reliable stream offsets/acks to `StreamData` and
|
||||
// `StreamWindowAdjust`.
|
||||
// v3: added `ForwardingKind::Agent` (SSH-agent forwarding). The new variant rides
|
||||
// inside `NativeUserAuth.requested_forwardings`, so a pre-agent peer would fail to
|
||||
// deserialize it; bumping the wire version makes such a peer answer with a clear
|
||||
// version-mismatch reject instead. Existing variants' bincode discriminants are
|
||||
// unchanged, so the bump is purely a compatibility gate.
|
||||
pub const VERSION: u8 = 3;
|
||||
pub const VERSION: u8 = 4;
|
||||
pub const HEADER_LEN: usize = 58;
|
||||
|
||||
/// Stable, user-facing reason string the server puts in an `AttachReject` when a
|
||||
@@ -416,12 +418,14 @@ pub struct StreamOpenReject {
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct StreamData {
|
||||
pub stream_id: u64,
|
||||
pub offset: u64,
|
||||
pub bytes: Vec<u8>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct StreamWindowAdjust {
|
||||
pub stream_id: u64,
|
||||
pub received_offset: u64,
|
||||
pub bytes: u32,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user