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

Method recv

src/posix/poll_socket.cpp:171–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 9

TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_PFunction · 0.45
TEST_PFunction · 0.45
on_acceptFunction · 0.45
TEST_FFunction · 0.45
TEST_PFunction · 0.45
foreachFunction · 0.45

Calls 3

getFunction · 0.85
readFunction · 0.70
thenMethod · 0.45

Tested by 9

TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_PFunction · 0.36
TEST_PFunction · 0.36
on_acceptFunction · 0.36
TEST_FFunction · 0.36
TEST_PFunction · 0.36
foreachFunction · 0.36