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

Method set

lib_acl_cpp/src/connpool/connect_manager.cpp:185–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185void connect_manager::set(const char* addr, size_t max, int conn_timeout /* 30 */,
186 int rw_timeout /* 30 */, bool sockopt_timeo /* false */, size_t min /* 0 */)
187{
188 string buf(addr);
189 buf.lower();
190
191 lock_guard guard(lock_);
192 std::map<string, conn_config>::iterator it = addrs_.find(buf);
193 if (it == addrs_.end()) {
194 conn_config config;
195 config.addr = addr;
196 config.max = max;
197 config.min = min;
198 config.conn_timeout = conn_timeout;
199 config.rw_timeout = rw_timeout;
200 config.sockopt_timeo = sockopt_timeo;
201 addrs_[buf] = config;
202 } else {
203 it->second.max = max;
204 it->second.min = min;
205 it->second.conn_timeout = conn_timeout;
206 it->second.rw_timeout = rw_timeout;
207 it->second.sockopt_timeo = sockopt_timeo;
208 }
209}
210
211const conn_config* connect_manager::get_config(const char* addr,
212 bool use_first /* false */)

Callers 2

tcp_ipc.cppFile · 0.45
sendMethod · 0.45

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected