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/httpparser.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/httpparser.cpp')
| -rw-r--r-- | src/zenhttp/httpparser.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/zenhttp/httpparser.cpp b/src/zenhttp/httpparser.cpp index ebfe36227..6b987151a 100644 --- a/src/zenhttp/httpparser.cpp +++ b/src/zenhttp/httpparser.cpp @@ -38,8 +38,7 @@ http_parser_settings HttpRequestParser::s_ParserSettings{ .on_chunk_header{}, .on_chunk_complete{}}; -void -HttpRequestParser::Initialize() +HttpRequestParser::HttpRequestParser(HttpRequestParserCallbacks& Connection) : m_Connection(Connection) { http_parser_init(&m_Parser, HTTP_REQUEST); m_Parser.data = this; @@ -47,6 +46,10 @@ HttpRequestParser::Initialize() ResetState(); } +HttpRequestParser::~HttpRequestParser() +{ +} + size_t HttpRequestParser::ConsumeData(const char* InputData, size_t DataSize) { |