Skip to content

Commit

Permalink
Two missing functions in Http3Response
Browse files Browse the repository at this point in the history
  • Loading branch information
uNetworkingAB committed Sep 28, 2022
1 parent 47ea36b commit 09a7b2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ struct TemplatedApp {
/* This will do for now, would be better if us_socket_context_remove_server_name returned the user data */
auto *domainRouter = us_socket_context_find_server_name_userdata(SSL, (struct us_socket_context_t *) httpContext, hostname_pattern.c_str());
if (domainRouter) {
delete (HttpRouter<typename HttpContextData<SSL>::RouterData>) domainRouter;
delete (HttpRouter<typename HttpContextData<SSL>::RouterData> *) domainRouter;
}

us_socket_context_remove_server_name(SSL, (struct us_socket_context_t *) httpContext, hostname_pattern.c_str());
Expand Down
9 changes: 9 additions & 0 deletions src/Http3Response.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ namespace uWS {
/* Is a quic stream */
struct Http3Response {

// this one is AsyncSocket, so it has to translate to the stream - abrupt stream termination
void close() {
//us_quic_stream_close((us_quic_stream_t *) this);
}

void endWithoutBody(std::optional<size_t> reportedContentLength = std::nullopt, bool closeConnection = false) {

}

Http3Response *writeStatus(std::string_view status) {
Http3ResponseData *responseData = (Http3ResponseData *) us_quic_stream_ext((us_quic_stream_t *) this);

Expand Down

0 comments on commit 09a7b2f

Please sign in to comment.