MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / process_server_socket

Function process_server_socket

examples/server/httplib.h:2608–2621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2606
2607template <typename T>
2608inline bool
2609process_server_socket(const std::atomic<socket_t> &svr_sock, socket_t sock,
2610 size_t keep_alive_max_count,
2611 time_t keep_alive_timeout_sec, time_t read_timeout_sec,
2612 time_t read_timeout_usec, time_t write_timeout_sec,
2613 time_t write_timeout_usec, T callback) {
2614 return process_server_socket_core(
2615 svr_sock, sock, keep_alive_max_count, keep_alive_timeout_sec,
2616 [&](bool close_connection, bool &connection_closed) {
2617 SocketStream strm(sock, read_timeout_sec, read_timeout_usec,
2618 write_timeout_sec, write_timeout_usec);
2619 return callback(strm, close_connection, connection_closed);
2620 });
2621}
2622
2623inline bool process_client_socket(socket_t sock, time_t read_timeout_sec,
2624 time_t read_timeout_usec,

Callers 1

Calls 1

Tested by

no test coverage detected