| 2482 | |
| 2483 | template <typename T> |
| 2484 | inline bool |
| 2485 | process_server_socket(const std::atomic<socket_t> &svr_sock, socket_t sock, |
| 2486 | size_t keep_alive_max_count, |
| 2487 | time_t keep_alive_timeout_sec, time_t read_timeout_sec, |
| 2488 | time_t read_timeout_usec, time_t write_timeout_sec, |
| 2489 | time_t write_timeout_usec, T callback) { |
| 2490 | return process_server_socket_core( |
| 2491 | svr_sock, sock, keep_alive_max_count, keep_alive_timeout_sec, |
| 2492 | [&](bool close_connection, bool &connection_closed) { |
| 2493 | SocketStream strm(sock, read_timeout_sec, read_timeout_usec, |
| 2494 | write_timeout_sec, write_timeout_usec); |
| 2495 | return callback(strm, close_connection, connection_closed); |
| 2496 | }); |
| 2497 | } |
| 2498 | |
| 2499 | inline bool process_client_socket(socket_t sock, time_t read_timeout_sec, |
| 2500 | time_t read_timeout_usec, |
no test coverage detected