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

Function send_all

src/ui/httpd.c:96–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96static int send_all(cbm_sock_t fd, const void *data, size_t len) {
97 const char *p = data;
98 size_t off = 0;
99 while (off < len) {
100#ifdef _WIN32
101 int n = send(fd, p + off, (int)(len - off), CBM_SEND_FLAGS);
102#else
103 ssize_t n = send(fd, p + off, len - off, CBM_SEND_FLAGS);
104#endif
105 if (n <= 0)
106 return -1;
107 off += (size_t)n;
108 }
109 return 0;
110}
111
112/* ── Listener ─────────────────────────────────────────────────── */
113

Callers 1

cbm_http_reply_bufFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected