Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
40
namespace libsocket {
41
void 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
47
uint32_t decode_uint32(const char* src) {
48
uint32_t result = 0;
Callers
2
sndmsg
Method · 0.85
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected