MCPcopy Create free account
hub / github.com/chrxh/alien / create_client_socket

Method create_client_socket

external/cpp-httplib/httplib.h:5933–5952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5931 }
5932
5933 inline socket_t ClientImpl::create_client_socket(Error& error) const {
5934 if (!proxy_host_.empty() && proxy_port_ != -1) {
5935 return detail::create_client_socket(
5936 proxy_host_.c_str(), "", proxy_port_, address_family_, tcp_nodelay_,
5937 socket_options_, connection_timeout_sec_, connection_timeout_usec_,
5938 read_timeout_sec_, read_timeout_usec_, write_timeout_sec_,
5939 write_timeout_usec_, interface_, error);
5940 }
5941
5942 // Check is custom IP specified for host_
5943 std::string ip;
5944 auto it = addr_map_.find(host_);
5945 if (it != addr_map_.end()) ip = it->second;
5946
5947 return detail::create_client_socket(
5948 host_.c_str(), ip.c_str(), port_, address_family_, tcp_nodelay_,
5949 socket_options_, connection_timeout_sec_, connection_timeout_usec_,
5950 read_timeout_sec_, read_timeout_usec_, write_timeout_sec_,
5951 write_timeout_usec_, interface_, error);
5952 }
5953
5954 inline bool ClientImpl::create_and_connect_socket(Socket& socket,
5955 Error& error) {

Callers

nothing calls this directly

Calls 3

create_client_socketFunction · 0.85
findMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected