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

Method try_open

lib_acl_cpp/src/connpool/tcp_client.cpp:42–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42bool tcp_client::try_open(bool* reuse_conn)
43{
44 if (conn_->opened()) {
45 *reuse_conn = true;
46 return true;
47 }
48
49 *reuse_conn = false;
50 if (!conn_->open(addr_, conn_timeout_, rw_timeout_)) {
51 logger_error("connect %s error %s", addr_, last_serror());
52 return false;
53 }
54
55 return true;
56}
57
58bool tcp_client::send(const void* data, unsigned int len, string* out /* = NULL */)
59{

Callers

nothing calls this directly

Calls 3

last_serrorFunction · 0.50
openedMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected