AiCPlayer
Interface of aic vm - for rendering aspect, sensors, video records
|
Utility to convert framing to varint32 for google’s parser. More...
Go to the source code of this file.
Functions | |
uint32_t | convert_framing_size (uint32_t len, uint8_t *bytes) |
Convert an unsigned int to varint32 so that google’s C++ protobuf libs can read it. More... | |
int | write_protobuf (socket_t sock, amqp_envelope_t *envelope) |
Write a protobuf, with a varint32 framing, and padding at the end from an envelope. More... | |
Utility to convert framing to varint32 for google’s parser.
Definition in file protobuf_framing.h.
uint32_t convert_framing_size | ( | uint32_t | len, |
uint8_t * | bytes | ||
) |
Convert an unsigned int to varint32 so that google’s C++ protobuf libs can read it.
len | the length to convert to varint32 |
bytes | a preallocated buffer to store the varint |
bytes
must be preallocated with at list 4 elements.
Convert unsigned int to varint32
Definition at line 13 of file protobuf_framing.c.
int write_protobuf | ( | socket_t | sock, |
amqp_envelope_t * | envelope | ||
) |
Write a protobuf, with a varint32 framing, and padding at the end from an envelope.
sock | the socket to use |
envelope | the envelope containing the bytes to write on the socket |
Write a protobuf, with a varint32 framing, and padding at the end
Definition at line 31 of file protobuf_framing.c.