MCPcopy Create free account
hub / github.com/dermesser/libsocket / encode_uint32

Function encode_uint32

C++/framing.cpp:41–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40namespace libsocket {
41void encode_uint32(uint32_t n, char* dst) {
42 for (int i = 3; i >= 0; i--) {
43 dst[i] = n >> (8 * (3 - i));
44 }
45}
46
47uint32_t decode_uint32(const char* src) {
48 uint32_t result = 0;

Callers 2

sndmsgMethod · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected