MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / create_client_socket

Method create_client_socket

examples/server/httplib.h:6263–6282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6261}
6262
6263inline socket_t ClientImpl::create_client_socket(Error &error) const {
6264 if (!proxy_host_.empty() && proxy_port_ != -1) {
6265 return detail::create_client_socket(
6266 proxy_host_, std::string(), proxy_port_, address_family_, tcp_nodelay_,
6267 socket_options_, connection_timeout_sec_, connection_timeout_usec_,
6268 read_timeout_sec_, read_timeout_usec_, write_timeout_sec_,
6269 write_timeout_usec_, interface_, error);
6270 }
6271
6272 // Check is custom IP specified for host_
6273 std::string ip;
6274 auto it = addr_map_.find(host_);
6275 if (it != addr_map_.end()) ip = it->second;
6276
6277 return detail::create_client_socket(
6278 host_, ip, port_, address_family_, tcp_nodelay_, socket_options_,
6279 connection_timeout_sec_, connection_timeout_usec_, read_timeout_sec_,
6280 read_timeout_usec_, write_timeout_sec_, write_timeout_usec_, interface_,
6281 error);
6282}
6283
6284inline bool ClientImpl::create_and_connect_socket(Socket &socket,
6285 Error &error) {

Callers

nothing calls this directly

Calls 5

create_client_socketFunction · 0.85
findMethod · 0.80
stringFunction · 0.70
emptyMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected