MCPcopy Create free account
hub / github.com/bcndev/bytecoin / write

Method write

src/http/Agent.cpp:191–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191void Agent::Connection::write() {
192 while (!responses.empty()) {
193 responses.front().copy_to(sock);
194 if (responses.front().size() != 0)
195 break;
196 responses.pop_front();
197 }
198 if (!waiting_write_response && responses.empty() && !keep_alive) {
199 sock.shutdown_both();
200 keep_alive = true;
201 }
202}
203
204void Agent::Connection::write(RequestBody &&response) {
205 invariant(waiting_write_response, "Client unexpected write");

Callers 1

set_requestMethod · 0.45

Calls 7

copy_toMethod · 0.80
shutdown_bothMethod · 0.80
writeFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
to_stringMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected