curl_ws_meta.md: polish and better vocabulary#22233
Conversation
There was a problem hiding this comment.
Pull request overview
Polishes the curl_ws_meta(3) manpage wording and formatting, clarifying how to interpret metadata for received WebSocket data.
Changes:
- Reflows the DESCRIPTION paragraph for better readability.
- Adds an explanatory paragraph distinguishing WebSocket frames from libcurl-delivered chunks.
- Updates terminology in
bytesleftandCURLWS_CONTsections from “fragment” to “frame”.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@HendrikHuebner does it clarify enough? Is it still vague in some area? |
|
That's definitely clearer. Additionally, I'd like to see clarification on whether the buffer libcurl provides to the write callback can contain multiple chunks from different frames, and how the application must handle this. For example, if we receive two frames in quick succession, curl presumably buffers these before dispatching the write callback. In my application I observed this scenario, where |
|
Added: Each callback delivers data for a single chunk that is then part of a single frame.
Not likely. It delivers the first callback and then it reuses buffers internally and calls the callback again with the next chunk, probably using the same memory area as for the previous callback. An application cannot assume anything else at least.
It suggests the buffer contains data after the chunk, yes. Right now I can't recall why it would do that... |
Assisted-by: Hendrik Hübner Closes #22233
|
Right, I'll try to investigate in my application, but at least it seems like the shape is generally correct already. Maybe @icing knows, whether The other problem from my original issue is that I observed strange values for |
No description provided.