MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / WriteAllToSocket

Function WriteAllToSocket

src/Http_Worker.c:238–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238static cc_result WriteAllToSocket(cc_socket socket, const cc_uint8* data, cc_uint32 count) {
239 cc_uint32 sent;
240 cc_result res;
241
242 while (count)
243 {
244 if ((res = Socket_Write(socket, data, count, &sent))) return res;
245 if (!sent) return ERR_END_OF_STREAM;
246
247 data += sent;
248 count -= sent;
249 }
250 return 0;
251}
252
253static cc_result HttpConnection_Read(struct HttpConnection* conn, cc_uint8* data, cc_uint32 count, cc_uint32* read) {
254 if (conn->sslCtx)

Callers 1

HttpConnection_WriteFunction · 0.85

Calls 1

Socket_WriteFunction · 0.70

Tested by

no test coverage detected