We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba68459 commit 8311e11Copy full SHA for 8311e11
httplib.h
@@ -2054,13 +2054,18 @@ inline uint64_t Response::get_header_value_u64(const std::string &key,
2054
2055
inline void default_socket_options(socket_t sock) {
2056
int opt = 1;
2057
+#ifdef _WIN32
2058
+ setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
2059
+ reinterpret_cast<const char *>(&opt), sizeof(opt));
2060
+#else
2061
#ifdef SO_REUSEPORT
2062
setsockopt(sock, SOL_SOCKET, SO_REUSEPORT,
2063
reinterpret_cast<const void *>(&opt), sizeof(opt));
2064
#else
2065
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
2066
2067
#endif
2068
+#endif
2069
}
2070
2071
inline const char *status_message(int status) {
0 commit comments