AiCPlayer
Interface of aic vm - for rendering aspect, sensors, video records
protobuf_framing.h
Go to the documentation of this file.
1 
5 #ifndef __PROTOBUF_FRAMING_H_
6 #define __PROTOBUF_FRAMING_H_
7 
8 #include <stdint.h>
9 #include <amqp.h>
10 
11 #include "socket.h"
12 
23 uint32_t convert_framing_size(uint32_t len, uint8_t* bytes);
24 
32 int write_protobuf(socket_t sock, amqp_envelope_t* envelope);
33 
34 #endif
int socket_t
Alias to differenciate between regular ints and socket fds.
Definition: socket.h:13
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.
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.
Define socket utilities to simplify networking.