aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpparser.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-10-10 13:30:07 +0200
committerGitHub <[email protected]>2023-10-10 13:30:07 +0200
commit7905d0d21af95c6016768d7a8a81dd9204b34d24 (patch)
tree076329f5fad1c33503ee611f6399853da2490567 /src/zenhttp/httpparser.cpp
parentcache reference tracking (#455) (diff)
downloadzen-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.cpp7
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)
{