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

Method recv

src/windows/poll_socket.cpp:165–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163
164
165Future<size_t> PollSocketImpl::recv(char* data, size_t size)
166{
167 // Need to hold a copy of `this` so that the underlying socket
168 // doesn't end up getting reused before we return from the call to
169 // `io::read` and end up reading data incorrectly.
170 auto self = shared(this);
171
172 return io::read(get(), data, size).then([self](size_t length) {
173 return length;
174 });
175}
176
177
178Future<size_t> PollSocketImpl::send(const char* data, size_t size)

Callers

nothing calls this directly

Calls 3

getFunction · 0.85
readFunction · 0.70
thenMethod · 0.45

Tested by

no test coverage detected