41 void encode_uint32(uint32_t n,
char* dst) {
42 for (
int i = 3; i >= 0; i--) {
43 dst[i] = n >> (8 * (3 - i));
47 uint32_t decode_uint32(
const char* src) {
51 const unsigned char* src_ = (
const unsigned char*)src;
53 for (
int i = 3; i >= 0; i--) {
54 result |= uint32_t(src_[i]) << (8 * (3 - i));
Contains libsocket elements.
Declarations of framing functions.