|
Symbian platform (C++)
SDK native APIs, runtime and tooling
|
Incrementally reads one network-order, 32-bit length-prefixed frame. More...
#include <cpp/symbian/agent/frame.h>
Public Member Functions | |
| FrameDecoder (std::size_t maximum_frame_bytes=kMaximumFrameBytes) | |
| std::size_t | buffered_bytes () const |
| Number of payload bytes already buffered for the current frame. | |
| void | Reset () |
| Clear an incomplete frame after disconnect or cancellation. | |
| absl::StatusOr< std::size_t > | Consume (std::span< const std::uint8_t > bytes, std::optional< Frame > *completed) |
Consume at most one frame from bytes. | |
Incrementally reads one network-order, 32-bit length-prefixed frame.
No payload buffer is allocated until the complete four-byte prefix has been checked against the configured limit. A zero length is invalid. The caller must authenticate its transport before handing frames to a request parser; this class does not grant permissions or interpret MessagePack.
|
explicit |
|
inline |
Number of payload bytes already buffered for the current frame.
| absl::StatusOr< std::size_t > symbian::agent::FrameDecoder::Consume | ( | std::span< const std::uint8_t > | bytes, |
| std::optional< Frame > * | completed | ||
| ) |
Consume at most one frame from bytes.
| bytes | Input bytes; any unused suffix belongs to the next frame. |
| completed | Receives a frame when this call completes one. |
| void symbian::agent::FrameDecoder::Reset | ( | ) |
Clear an incomplete frame after disconnect or cancellation.