| 5703 | } |
| 5704 | |
| 5705 | inline socket_t |
| 5706 | Server::create_server_socket(const std::string &host, int port, |
| 5707 | int socket_flags, |
| 5708 | SocketOptions socket_options) const { |
| 5709 | return detail::create_socket( |
| 5710 | host, std::string(), port, address_family_, socket_flags, tcp_nodelay_, |
| 5711 | std::move(socket_options), |
| 5712 | [](socket_t sock, struct addrinfo &ai) -> bool { |
| 5713 | if (::bind(sock, ai.ai_addr, static_cast<socklen_t>(ai.ai_addrlen))) { |
| 5714 | return false; |
| 5715 | } |
| 5716 | if (::listen(sock, CPPHTTPLIB_LISTEN_BACKLOG)) { return false; } |
| 5717 | return true; |
| 5718 | }); |
| 5719 | } |
| 5720 | |
| 5721 | inline int Server::bind_internal(const std::string &host, int port, |
| 5722 | int socket_flags) { |
nothing calls this directly
no test coverage detected