MCPcopy Create free account
hub / github.com/acl-dev/acl / send

Method send

lib_acl_cpp/src/connpool/tcp_pool.cpp:24–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24bool tcp_pool::send(const void* data, unsigned int len, string* out /* = NULL */)
25{
26 tcp_client* conn = (tcp_client*) this->peek();
27 if (conn == NULL) {
28 logger_error("no connection available, addr=%s",
29 this->get_addr());
30 return false;
31 }
32
33 if (!conn->send(data, len, out)) {
34 this->put(conn, false);
35 return false;
36 }
37
38 this->put(conn);
39 return true;
40}
41
42} // namespace acl

Callers

nothing calls this directly

Calls 3

peekMethod · 0.45
get_addrMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected