| 150 | } |
| 151 | |
| 152 | bool valid_socket(const SocketDescriptor fd) noexcept { |
| 153 | #ifdef WIN32 |
| 154 | return fd != INVALID_SOCKET && fd >= 0; |
| 155 | #else |
| 156 | return fd >= 0; |
| 157 | #endif /* WIN32 */ |
| 158 | } |
| 159 | |
| 160 | Socket::Socket(const std::shared_ptr<SocketContext>& /*context*/, std::string hostname, const uint16_t port, const uint16_t listeners) |
| 161 | : requested_hostname_(std::move(hostname)), |
no outgoing calls
no test coverage detected