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

Method writev

common/memory-stream/memory-stream.cpp:267–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265 return count;
266 }
267 virtual ssize_t writev(const struct iovec *iov, int iovcnt) override {
268 ssize_t s = 0;
269 for (int i = 0; i < iovcnt; ++i) {
270 ssize_t ret = write(iov[i].iov_base, iov[i].iov_len);
271 if (ret < 0) return ret;
272 s += ret;
273 if (ret < (ssize_t)iov[i].iov_len) break;
274 }
275 return s;
276 }
277 virtual Object* get_underlay_object(uint64_t recursion = 0) override { return 0; }
278 virtual ssize_t sendfile(int in_fd, off_t offset, size_t count) override { ERROR_RETURN(ENOSYS, -1); }
279 virtual int setsockopt(int level, int option_name, const void* option_value, socklen_t option_len) override { ERROR_RETURN(ENOSYS, -1); }

Callers

nothing calls this directly

Calls 1

writeFunction · 0.85

Tested by

no test coverage detected