yhirose 11 months ago
parent
commit
343a0fc073
1 changed files with 0 additions and 7 deletions
  1. 0 7
      httplib.h

+ 0 - 7
httplib.h

@@ -2038,12 +2038,6 @@ inline uint64_t Response::get_header_value_u64(const std::string &key,
 
 
 inline void default_socket_options(socket_t sock) {
 inline void default_socket_options(socket_t sock) {
   int opt = 1;
   int opt = 1;
-#ifdef _WIN32
-  setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
-             reinterpret_cast<const char *>(&opt), sizeof(opt));
-  setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE,
-             reinterpret_cast<const char *>(&opt), sizeof(opt));
-#else
 #ifdef SO_REUSEPORT
 #ifdef SO_REUSEPORT
   setsockopt(sock, SOL_SOCKET, SO_REUSEPORT,
   setsockopt(sock, SOL_SOCKET, SO_REUSEPORT,
              reinterpret_cast<const void *>(&opt), sizeof(opt));
              reinterpret_cast<const void *>(&opt), sizeof(opt));
@@ -2051,7 +2045,6 @@ inline void default_socket_options(socket_t sock) {
   setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
   setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
              reinterpret_cast<const void *>(&opt), sizeof(opt));
              reinterpret_cast<const void *>(&opt), sizeof(opt));
 #endif
 #endif
-#endif
 }
 }
 
 
 inline const char *status_message(int status) {
 inline const char *status_message(int status) {