diff options
| author | Stefan Boberg <[email protected]> | 2023-10-10 13:30:07 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-10 13:30:07 +0200 |
| commit | 7905d0d21af95c6016768d7a8a81dd9204b34d24 (patch) | |
| tree | 076329f5fad1c33503ee611f6399853da2490567 /src/zenhttp/httpasio.cpp | |
| parent | cache reference tracking (#455) (diff) | |
| download | zen-7905d0d21af95c6016768d7a8a81dd9204b34d24.tar.xz zen-7905d0d21af95c6016768d7a8a81dd9204b34d24.zip | |
experimental pluggable transport support (#436)
this change adds a `--http=plugin` mode where we support pluggable transports. Currently this defaults to a barebones blocking winsock implementation but there is also support for dynamic loading of transport plugins, which will be further developed in the near future.
Diffstat (limited to 'src/zenhttp/httpasio.cpp')
| -rw-r--r-- | src/zenhttp/httpasio.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/zenhttp/httpasio.cpp b/src/zenhttp/httpasio.cpp index 702ca11fd..562f75e3d 100644 --- a/src/zenhttp/httpasio.cpp +++ b/src/zenhttp/httpasio.cpp @@ -214,7 +214,7 @@ private: ////////////////////////////////////////////////////////////////////////// -struct HttpServerConnection : public HttpConnectionBase, std::enable_shared_from_this<HttpServerConnection> +struct HttpServerConnection : public HttpRequestParserCallbacks, std::enable_shared_from_this<HttpServerConnection> { HttpServerConnection(HttpAsioServerImpl& Server, std::unique_ptr<asio::ip::tcp::socket>&& Socket); ~HttpServerConnection(); @@ -223,10 +223,11 @@ struct HttpServerConnection : public HttpConnectionBase, std::enable_shared_from // HttpConnectionBase implementation - virtual void HandleNewRequest() override; virtual void TerminateConnection() override; virtual void HandleRequest() override; + void HandleNewRequest(); + private: enum class RequestState { @@ -276,8 +277,6 @@ HttpServerConnection::~HttpServerConnection() void HttpServerConnection::HandleNewRequest() { - m_RequestData.Initialize(); - EnqueueRead(); } |