MCPcopy Create free account
hub / github.com/chrxh/alien / process_server_socket

Function process_server_socket

external/cpp-httplib/httplib.h:2514–2527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2512
2513 template <typename T>
2514 inline bool
2515 process_server_socket(const std::atomic<socket_t>& svr_sock, socket_t sock,
2516 size_t keep_alive_max_count,
2517 time_t keep_alive_timeout_sec, time_t read_timeout_sec,
2518 time_t read_timeout_usec, time_t write_timeout_sec,
2519 time_t write_timeout_usec, T callback) {
2520 return process_server_socket_core(
2521 svr_sock, sock, keep_alive_max_count, keep_alive_timeout_sec,
2522 [&](bool close_connection, bool& connection_closed) {
2523 SocketStream strm(sock, read_timeout_sec, read_timeout_usec,
2524 write_timeout_sec, write_timeout_usec);
2525 return callback(strm, close_connection, connection_closed);
2526 });
2527 }
2528
2529 inline bool process_client_socket(socket_t sock, time_t read_timeout_sec,
2530 time_t read_timeout_usec,

Callers 1

Calls 1

Tested by

no test coverage detected