MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / socket_set_nonblocking

Function socket_set_nonblocking

src/ui/httpd.c:134–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134static bool socket_set_nonblocking(cbm_sock_t fd) {
135#ifdef _WIN32
136 u_long enabled = 1;
137 return ioctlsocket(fd, FIONBIO, &enabled) == 0;
138#else
139 int flags = fcntl(fd, F_GETFL, 0);
140 return flags >= 0 && fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0;
141#endif
142}
143
144static void socket_shutdown(cbm_sock_t fd) {
145#ifdef _WIN32

Callers 2

cbm_httpd_listenFunction · 0.85
cbm_httpd_acceptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected