MCPcopy Create free account
hub / github.com/3rdparty/libprocess / sendfile

Method sendfile

src/windows/poll_socket.cpp:194–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192
193
194Future<size_t> PollSocketImpl::sendfile(int_fd fd, off_t offset, size_t size)
195{
196 CHECK(size > 0); // TODO(benh): Just return 0 if `size` is 0?
197
198 // Need to hold a copy of `this` so that the underlying socket
199 // doesn't end up getting reused before we return.
200 auto self = shared(this);
201
202 return windows::sendfile(self->get(), fd, offset, size)
203 .then([self](size_t length) { return length; });
204}
205
206} // namespace internal {
207} // namespace network {

Callers

nothing calls this directly

Calls 3

sendfileFunction · 0.70
thenMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected