@brief HttpSession class implementation @param socket the socket @param server the server
| 173 | ///@param socket the socket |
| 174 | ///@param server the server |
| 175 | HttpSession::HttpSession(tcp::socket socket, WebServer& server) |
| 176 | : socket_(std::move(socket)) |
| 177 | , server_(server) |
| 178 | , is_streaming_(false) { |
| 179 | // Set socket timeout |
| 180 | socket_.set_option(tcp::socket::keep_alive(false)); |
| 181 | // Avoid abortive close that can lead to client-side broken pipe on large uploads |
| 182 | socket_.set_option(tcp::socket::linger(false, 0)); |
| 183 | |
| 184 | // Debug: Log TCP connection formation |
| 185 | header_print("🔗 ", "TCP connection established - Remote: " + socket_.remote_endpoint().address().to_string() + ":" + std::to_string(socket_.remote_endpoint().port())); |
| 186 | } |
| 187 | |
| 188 | ///@brief start |
| 189 | void HttpSession::start(bool cors) { |
nothing calls this directly
no test coverage detected