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

Method _send

src/http.cpp:1231–1247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1229
1230private:
1231 static Future<Nothing> _send(network::Socket socket, Pipe::Reader reader)
1232 {
1233 return loop(
1234 None(),
1235 [=]() mutable {
1236 return reader.read();
1237 },
1238 [=](const string& data) mutable -> Future<ControlFlow<Nothing>> {
1239 if (data.empty()) {
1240 return Break(); // EOF.
1241 }
1242 return socket.send(data)
1243 .then([]() -> ControlFlow<Nothing> {
1244 return Continue();
1245 });
1246 });
1247 }
1248
1249 void read()
1250 {

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected