MCPcopy Create free account
hub / github.com/apache/mesos / send

Method send

3rdparty/libprocess/src/windows/poll_socket.cpp:192–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190
191
192Future<size_t> PollSocketImpl::send(const char* data, size_t size)
193{
194 CHECK(size > 0); // TODO(benh): Just return 0 if `size` is 0?
195
196 // Need to hold a copy of `this` so that the underlying socket
197 // doesn't end up getting reused before we return.
198 auto self = shared(this);
199
200 // TODO(benh): Reuse `io::write`? Or is `net::send` and
201 // `MSG_NOSIGNAL` critical here?
202 return io::write(get(), data, size).then([self](size_t length) {
203 return length;
204 });
205}
206
207
208Future<size_t> PollSocketImpl::sendfile(int_fd fd, off_t offset, size_t size)

Callers

nothing calls this directly

Calls 3

writeFunction · 0.70
getFunction · 0.50
thenMethod · 0.45

Tested by

no test coverage detected