MCPcopy Create free account
hub / github.com/PABannier/bark.cpp / create_client_socket

Method create_client_socket

examples/server/httplib.h:6669–6688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6667}
6668
6669inline socket_t ClientImpl::create_client_socket(Error &error) const {
6670 if (!proxy_host_.empty() && proxy_port_ != -1) {
6671 return detail::create_client_socket(
6672 proxy_host_, std::string(), proxy_port_, address_family_, tcp_nodelay_,
6673 socket_options_, connection_timeout_sec_, connection_timeout_usec_,
6674 read_timeout_sec_, read_timeout_usec_, write_timeout_sec_,
6675 write_timeout_usec_, interface_, error);
6676 }
6677
6678 // Check is custom IP specified for host_
6679 std::string ip;
6680 auto it = addr_map_.find(host_);
6681 if (it != addr_map_.end()) ip = it->second;
6682
6683 return detail::create_client_socket(
6684 host_, ip, port_, address_family_, tcp_nodelay_, socket_options_,
6685 connection_timeout_sec_, connection_timeout_usec_, read_timeout_sec_,
6686 read_timeout_usec_, write_timeout_sec_, write_timeout_usec_, interface_,
6687 error);
6688}
6689
6690inline bool ClientImpl::create_and_connect_socket(Socket &socket,
6691 Error &error) {

Callers

nothing calls this directly

Calls 4

create_client_socketFunction · 0.85
stringFunction · 0.85
emptyMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected