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

Method open

lib_acl_cpp/src/http/http_client.cpp:118–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118bool http_client::open(const char* addr, int conn_timeout /* = 60 */,
119 int rw_timeout /* = 60 */, bool unzip /* = true */)
120{
121 is_request_ = true;
122
123 if (stream_ && !stream_fixed_) {
124 delete stream_;
125 stream_ = NULL;
126 disconnected_ = true;
127 }
128
129 socket_stream* stream = NEW socket_stream();
130 unzip_ = unzip;
131
132 if (!stream->open(addr, conn_timeout, rw_timeout)) {
133 delete stream;
134 disconnected_ = true;
135 return false;
136 }
137
138 disconnected_ = false;
139 stream_ = stream;
140 return true;
141}
142
143//////////////////////////////////////////////////////////////////////////////
144

Callers 4

startMethod · 0.45
connect_serverMethod · 0.45
on_acceptMethod · 0.45
open_tblMethod · 0.45

Calls 1

socket_streamClass · 0.50

Tested by

no test coverage detected