You've already forked cpp-httplib
Use IPPROTO_IP
This commit is contained in:
@ -3262,7 +3262,7 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
|
|||||||
|
|
||||||
memset(&hints, 0, sizeof(struct addrinfo));
|
memset(&hints, 0, sizeof(struct addrinfo));
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
hints.ai_protocol = 0;
|
hints.ai_protocol = IPPROTO_IP;
|
||||||
|
|
||||||
if (!ip.empty()) {
|
if (!ip.empty()) {
|
||||||
node = ip.c_str();
|
node = ip.c_str();
|
||||||
|
Reference in New Issue
Block a user