mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-10-18 22:54:01 +00:00
d9895ff9cb4c77137fb05ce3161bcf7210177aef
Upstream reserves a frame's whole declared length the moment its header is in, bounded only by max_frame_size, so a header alone buys the allocation it names: 128 KiB before a session is authorized and 16 MiB after. The rustdesk-org tungstenite-rs fork on rustdesk-patches-0.29, upstream v0.29.0, grows the read buffer one read_buffer_size chunk at a time as the bytes actually arrive instead, and tokio-tungstenite moves to its rustdesk-patches-0.29 branch to match, still one commit for set_config. 0.27's read chunking comes with the move, so a large frame no longer clears its whole grown buffer on every read. No source change: Bytes payloads and the non-exhaustive config arrived in 0.26 and 0.25 and were already in use here, and 0.28's boxing of Error::Http derefs at its one use. The read buffer keeps tungstenite's 128 KiB default, this side reading video frames and file blocks over a handful of connections rather than small messages over thousands. The workspace root patches tungstenite to the fork, where cargo reads [patch], so this crate's copy and tokio-tungstenite's resolve to one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab
Description
No description provided
75 MiB
Languages
Rust
100%