|
Orbit Framework
An ultra-modern, asynchronous, cross-platform C++ Web Framework.
|
Classes | |
| struct | FrameHeader |
| A decoded RFC 6455 frame header. More... | |
Functions | |
| bool | parse_frame_header (const std::vector< char > &buffer, FrameHeader &header) |
| Decodes an RFC 6455 frame header from the front of a buffer. | |
| void | unmask_payload (std::string &payload, const uint8_t mask_key[4]) |
| Unmasks a frame payload in place using the frame's masking key. | |
| bool http::websocket::detail::parse_frame_header | ( | const std::vector< char > & | buffer, |
| FrameHeader & | header | ||
| ) |
Decodes an RFC 6455 frame header from the front of a buffer.
Returns false when the buffer does not yet hold the complete header and payload, so the caller can wait for more data. On success, header_length is the number of bytes preceding the payload, including the extended length and masking key when present.
| buffer | The raw bytes received so far. |
| header | Populated on success. |
| void http::websocket::detail::unmask_payload | ( | std::string & | payload, |
| const uint8_t | mask_key[4] | ||
| ) |
Unmasks a frame payload in place using the frame's masking key.
| payload | The masked payload bytes. |
| mask_key | The 4-byte masking key from the frame header. |