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

Method _send

3rdparty/libprocess/src/http.cpp:1317–1333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1315
1316private:
1317 static Future<Nothing> _send(network::Socket socket, Pipe::Reader reader)
1318 {
1319 return loop(
1320 None(),
1321 [=]() mutable {
1322 return reader.read();
1323 },
1324 [=](const string& data) mutable -> Future<ControlFlow<Nothing>> {
1325 if (data.empty()) {
1326 return Break(); // EOF.
1327 }
1328 return socket.send(data)
1329 .then([]() -> ControlFlow<Nothing> {
1330 return Continue();
1331 });
1332 });
1333 }
1334
1335 void read()
1336 {

Callers

nothing calls this directly

Calls 8

loopFunction · 0.85
NoneClass · 0.85
sendMethod · 0.65
BreakFunction · 0.50
ContinueClass · 0.50
readMethod · 0.45
emptyMethod · 0.45
thenMethod · 0.45

Tested by

no test coverage detected