@brief close connection
| 192 | |
| 193 | ///@brief close connection |
| 194 | void HttpSession::close_connection() { |
| 195 | boost::system::error_code ec; |
| 196 | |
| 197 | // Debug: Log TCP connection disconnection |
| 198 | try { |
| 199 | header_print("🔒 ", "TCP connection closing - Remote: " + socket_.remote_endpoint().address().to_string() + ":" + std::to_string(socket_.remote_endpoint().port())); |
| 200 | } catch (const std::exception& e) { |
| 201 | header_print("🔒 ", "TCP connection closing - Remote endpoint unavailable"); |
| 202 | } |
| 203 | socket_.shutdown(tcp::socket::shutdown_both, ec); |
| 204 | server_.active_connections_.fetch_sub(1); |
| 205 | } |
| 206 | |
| 207 | ///@brief read request |
| 208 | void HttpSession::read_request(bool cors) { |
nothing calls this directly
no test coverage detected