MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / doio_loop

Function doio_loop

net/basic_socket.h:112–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110#define DOIO_ONCE(iocb, waitcb) doio_once(LAMBDA(iocb), LAMBDA(waitcb))
111
112template <typename IOCB, typename STEP> __FORCE_INLINE__
113ssize_t doio_loop(IOCB iocb, STEP step) {
114 ssize_t ret, n = 0;
115 do {
116 ret = iocb();
117 if (ret < 0) return ret; // error
118 if (ret == 0) break; // EOF
119 n += ret;
120 } while (step(ret, n));
121 return n;
122}
123
124struct BufStep {
125 void*& buf;

Callers 1

sendfile_nFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected