| 199 | } |
| 200 | |
| 201 | bool Connection::should_keep_alive() const |
| 202 | { |
| 203 | if (!request_.keep_alive()) |
| 204 | { |
| 205 | return false; |
| 206 | } |
| 207 | |
| 208 | if (processed_requests_ >= KEEPALIVE_MAX_REQUESTS) |
| 209 | { |
| 210 | return false; |
| 211 | } |
| 212 | |
| 213 | return true; |
| 214 | } |
| 215 | |
| 216 | std::vector<char> Connection::compress_buffers(const std::vector<char> &uncompressed_data, |
| 217 | const http::compression_type compression_type) |