MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / process_server_socket

Function process_server_socket

dependencies/httplib/httplib.h:2484–2497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2482
2483template <typename T>
2484inline bool
2485process_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
2499inline bool process_client_socket(socket_t sock, time_t read_timeout_sec,
2500 time_t read_timeout_usec,

Callers 1

Calls 1

Tested by

no test coverage detected