MCPcopy Create free account
hub / github.com/antirez/ds4 / dist_write_full

Function dist_write_full

ds4_distributed.c:1081–1094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1079#endif
1080
1081static int dist_write_full(int fd, const void *buf, size_t len) {
1082 const unsigned char *p = buf;
1083 while (len > 0) {
1084 ssize_t n = send(fd, p, len, 0);
1085 if (n < 0) {
1086 if (errno == EINTR) continue;
1087 return -1;
1088 }
1089 if (n == 0) return -1;
1090 p += (size_t)n;
1091 len -= (size_t)n;
1092 }
1093 return 0;
1094}
1095
1096static int dist_read_full(int fd, void *buf, size_t len) {
1097 unsigned char *p = buf;

Callers 12

dist_write_frame_headerFunction · 0.85
dist_send_errorFunction · 0.85
dist_send_helloFunction · 0.85
dist_send_work_resultFunction · 0.85
dist_send_snapshot_beginFunction · 0.85
dist_send_snapshot_doneFunction · 0.85
dist_send_work_frameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected