42 parser_.buffer_consumed(num_bytes);
46 msgpack::object_handle object;
51 }
catch (
const msgpack::unpack_error&) {
53 StatusCode::INVALID_MESSAGE,
"Failed to parse a message.");
Class of exceptions in cpp-msgpack-rpc library.
Class of configuration of parsers of messages.
Class of buffers without memory management.
~MessageParser()
Destructor.
std::size_t read_buffer_size_
Buffer size to read at once.
std::optional< ParsedMessage > try_parse()
Try to parse a message and return it if parsed, throw an exception if the message data is invalid.
void consumed(std::size_t num_bytes)
Set some bytes to be consumed.
MessageParser(const config::MessageParserConfig &config)
Constructor.
BufferView prepare_buffer()
Prepare a buffer.
msgpack::unpacker parser_
Parser.
Definition of MessageParser class.
Definition of MsgpackRPCException class.
Namespace of configurations.
ParsedMessage parse_message_from_object(msgpack::object_handle object)
Parse a message from an object in msgpack library.
Definition of parse_message_from_object function.
Definition of ParsedMessage type.
Definition of StatusCode enumeration.