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

Method connect_server

lib_acl_cpp/src/http/http_service.cpp:283–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281#endif
282
283 http_status_t connect_server(void)
284 {
285 string addr(data_.callback->get_domain());
286 addr << ':' << data_.callback->get_port();
287
288 if (client_.opened()) {
289 client_.close();
290 }
291
292 if (!client_.open(addr.c_str(), 60, 60)) {
293 logger_error("connect %s error(%s)",
294 addr.c_str(), acl_last_serror());
295 return HTTP_ERR_CONN;
296 }
297
298 vstream_ = client_.get_vstream();
299 return HTTP_OK;
300 }
301
302 http_status_t send_request(void)
303 {

Callers

nothing calls this directly

Calls 8

acl_last_serrorFunction · 0.85
get_domainMethod · 0.45
get_portMethod · 0.45
openedMethod · 0.45
closeMethod · 0.45
openMethod · 0.45
c_strMethod · 0.45
get_vstreamMethod · 0.45

Tested by

no test coverage detected