| 5725 | } |
| 5726 | |
| 5727 | inline socket_t |
| 5728 | Server::create_server_socket(const std::string &host, int port, |
| 5729 | int socket_flags, |
| 5730 | SocketOptions socket_options) const { |
| 5731 | return detail::create_socket( |
| 5732 | host, std::string(), port, address_family_, socket_flags, tcp_nodelay_, |
| 5733 | std::move(socket_options), |
| 5734 | [](socket_t sock, struct addrinfo &ai) -> bool { |
| 5735 | if (::bind(sock, ai.ai_addr, static_cast<socklen_t>(ai.ai_addrlen))) { |
| 5736 | return false; |
| 5737 | } |
| 5738 | if (::listen(sock, CPPHTTPLIB_LISTEN_BACKLOG)) { return false; } |
| 5739 | return true; |
| 5740 | }); |
| 5741 | } |
| 5742 | |
| 5743 | inline int Server::bind_internal(const std::string &host, int port, |
| 5744 | int socket_flags) { |
nothing calls this directly
no test coverage detected