MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / send_io

Function send_io

modules/data/mp3/libmad/decoder.c:129–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127
128# if defined(USE_ASYNC)
129static
130enum mad_flow send_io(int fd, void const *data, size_t len)
131{
132 char const *ptr = data;
133 ssize_t count;
134
135 while (len) {
136 do
137 count = write(fd, ptr, len);
138 while (count == -1 && errno == EINTR);
139
140 if (count == -1)
141 return MAD_FLOW_BREAK;
142
143 len -= count;
144 ptr += count;
145 }
146
147 return MAD_FLOW_CONTINUE;
148}
149
150static
151enum mad_flow receive_io(int fd, void *buffer, size_t len)

Callers 1

sendFunction · 0.85

Calls 1

writeFunction · 0.50

Tested by

no test coverage detected