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

Function ignore_recv_data

3rdparty/libprocess/src/process.cpp:1421–1444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1419namespace internal {
1420
1421void ignore_recv_data(
1422 const Future<size_t>& length,
1423 Socket socket,
1424 char* data,
1425 size_t size)
1426{
1427 if (!length.isReady() || length.get() == 0) {
1428 if (length.isFailed()) {
1429 Try<Address> peer = socket.peer();
1430
1431 LOG(WARNING)
1432 << "Failed to recv on socket " << socket.get() << " to peer '"
1433 << (peer.isSome() ? stringify(peer.get()) : "unknown")
1434 << "': " << length.failure();
1435 }
1436
1437 socket_manager->close(socket);
1438 delete[] data;
1439 return;
1440 }
1441
1442 socket.recv(data, size)
1443 .onAny(lambda::bind(&ignore_recv_data, lambda::_1, socket, data, size));
1444}
1445
1446
1447// Forward declaration.

Callers

nothing calls this directly

Calls 10

isReadyMethod · 0.80
isFailedMethod · 0.80
failureMethod · 0.80
stringifyClass · 0.50
bindFunction · 0.50
getMethod · 0.45
peerMethod · 0.45
isSomeMethod · 0.45
closeMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected