keep alive setting for server and websocket improvements

This commit is contained in:
feedc0de committed 2022-06-30 06:55:32 +02:00
1 parent dd07aaede6
commit def545ba3d
14 files changed
+327 -380

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ void ClientConnection::responseFinished(std::error_code ec)
return;
}
if constexpr (true) // Connection: Keep
if (m_webserver.connectionKeepAlive())
{
// ESP_LOGD(TAG, "state changed to RequestLine");
m_state = State::RequestLine;
+2
View File
@@ -18,6 +18,8 @@ public:
Webserver(asio::io_context& io_context, unsigned short port);
virtual ~Webserver() = default;
virtual bool connectionKeepAlive() const = 0;
virtual std::unique_ptr<ResponseHandler> makeResponseHandler(ClientConnection &clientConnection, std::string_view method, std::string_view path, std::string_view protocol) = 0;
protected: