MCPcopy Create free account
hub / github.com/apache/thrift / tcp_send

Function tcp_send

lib/lua/src/usocket.c:427–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425
426#define WRITE_STEP 8192
427const char * tcp_send(
428 p_socket sock, const char * data, size_t w_len, int timeout) {
429 int err;
430 size_t put = 0, step;
431 if (!w_len) {
432 return NULL;
433 }
434
435 do {
436 step = (WRITE_STEP < w_len - put ? WRITE_STEP : w_len - put);
437 err = socket_send(sock, data + put, step, timeout);
438 put += step;
439 } while (err == SUCCESS && put < w_len);
440 ERRORSTR_RETURN(err);
441}
442
443const char * tcp_raw_receive(
444 p_socket sock, char * data, size_t r_len, int timeout, int *received) {

Callers 1

l_socket_sendFunction · 0.85

Calls 1

socket_sendFunction · 0.85

Tested by

no test coverage detected