mirror of
https://github.com/livekit/livekit.git
synced 2026-09-14 17:35:43 +00:00
- ReadFrame reads each frame into a reused per-conn buffer via NextReader instead of letting ReadMessage allocate one per frame; ~41% fewer bytes on a 1MiB download. Safe: proto.Unmarshal copies the payload out and readLoop is the sole reader. - the data wire's websocket read is bounded by its own max message size (a full frame + framing overhead), independent of the signalling message limit, so a peer cannot OOM the server with an oversized frame even when signalling limits are disabled. Drops the old coupling that clamped MaxFrameSize under the signalling limit.