@@ -3252,7 +3252,8 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
3252
3252
if (addrlen > sizeof (sockaddr_un::sun_path)) { return INVALID_SOCKET; }
3253
3253
3254
3254
#ifdef SOCK_CLOEXEC
3255
- auto sock = socket (hints.ai_family , hints.ai_socktype | SOCK_CLOEXEC, hints.ai_protocol );
3255
+ auto sock = socket (hints.ai_family , hints.ai_socktype | SOCK_CLOEXEC,
3256
+ hints.ai_protocol );
3256
3257
#else
3257
3258
auto sock = socket (hints.ai_family , hints.ai_socktype , hints.ai_protocol );
3258
3259
#endif
@@ -3316,7 +3317,8 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
3316
3317
#else
3317
3318
3318
3319
#ifdef SOCK_CLOEXEC
3319
- auto sock = socket (rp->ai_family , rp->ai_socktype | SOCK_CLOEXEC, rp->ai_protocol );
3320
+ auto sock =
3321
+ socket (rp->ai_family , rp->ai_socktype | SOCK_CLOEXEC, rp->ai_protocol );
3320
3322
#else
3321
3323
auto sock = socket (rp->ai_family , rp->ai_socktype , rp->ai_protocol );
3322
3324
#endif
@@ -6521,9 +6523,10 @@ inline bool Server::listen_internal() {
6521
6523
#endif
6522
6524
6523
6525
#if defined _WIN32
6524
- // sockets conneced via WASAccept inherit flags NO_HANDLE_INHERIT, OVERLAPPED
6526
+ // sockets conneced via WASAccept inherit flags NO_HANDLE_INHERIT,
6527
+ // OVERLAPPED
6525
6528
socket_t sock = WSAAccept (svr_sock_, nullptr , nullptr , nullptr , 0 );
6526
- #elif defined __linux__
6529
+ #elif defined SOCK_CLOEXEC
6527
6530
socket_t sock = accept4 (svr_sock_, nullptr , nullptr , SOCK_CLOEXEC);
6528
6531
#else
6529
6532
socket_t sock = accept (svr_sock_, nullptr , nullptr );
@@ -9343,7 +9346,7 @@ inline Client::Client(const std::string &scheme_host_port,
9343
9346
cli_ = detail::make_unique<ClientImpl>(scheme_host_port, 80 ,
9344
9347
client_cert_path, client_key_path);
9345
9348
}
9346
- }
9349
+ } // namespace detail
9347
9350
9348
9351
inline Client::Client (const std::string &host, int port)
9349
9352
: cli_ (detail::make_unique<ClientImpl>(host, port)) {}
0 commit comments