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

Function th_send_all

tests/test_httpd.c:88–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static int th_send_all(th_sock_t s, const char *data, size_t len) {
89 size_t off = 0;
90 while (off < len) {
91#ifdef _WIN32
92 int n = send(s, data + off, (int)(len - off), 0);
93#else
94 ssize_t n = send(s, data + off, len - off, 0);
95#endif
96 if (n <= 0)
97 return -1;
98 off += (size_t)n;
99 }
100 return 0;
101}
102
103/* Read until the server closes the connection (Connection: close model). */
104static int th_recv_until_close(th_sock_t s, char *buf, size_t bufsz) {

Callers 3

th_httpFunction · 0.85
test_httpd.cFile · 0.85
th_http_deadlineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected