MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / loopback

Function loopback

test/sockets/test_tcp_client_bind.c:48–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48struct sockaddr_in loopback(uint16_t port) {
49 struct sockaddr_in a;
50 memset(&a, 0, sizeof(a));
51 a.sin_family = AF_INET;
52 a.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
53 a.sin_port = htons(port);
54 return a;
55}
56
57void main_loop(void) {
58 fd_set fdr, fdw;

Callers 1

mainFunction · 0.85

Calls 3

memsetFunction · 0.85
htonlFunction · 0.85
htonsFunction · 0.85

Tested by

no test coverage detected