Wrap more h3, bump uSockets, remove old stuff, add SSL cert

This commit is contained in:
Alex Hultman
2022-08-29 01:24:08 +02:00
parent 2ce8af23c7
commit 0f80f142d7
17 changed files with 90 additions and 279 deletions
+8 -1
View File
@@ -10,8 +10,15 @@ namespace uWS {
Http3Context *http3Context;
H3App(SocketContextOptions options = {}) {
/* This conversion should not be needed */
us_quic_socket_context_options_t h3options = {};
h3options.key_file_name = strdup(options.key_file_name);
h3options.cert_file_name = strdup(options.cert_file_name);
h3options.passphrase = strdup(options.passphrase);
/* Create the http3 context */
http3Context = Http3Context::create((us_loop_t *)Loop::get(), {});
http3Context = Http3Context::create((us_loop_t *)Loop::get(), h3options);
http3Context->init();
}
+18 -1
View File
@@ -2,6 +2,8 @@ extern "C" {
#include "quic.h"
}
#include "Http3ResponseData.h"
namespace uWS {
/* Is a quic stream */
@@ -11,9 +13,24 @@ namespace uWS {
}
void writeHeader() {
}
void tryEnd() {
}
void write() {
}
void end(std::string_view data) {
// Http3ResponseData *responseData = us_quic_stream_ext(this);
Http3ResponseData *responseData = (Http3ResponseData *) us_quic_stream_ext((us_quic_stream_t *) this);
printf("Wrapper responseData is %p\n", responseData);
printf("%s\n", responseData);
// if not already written status then write status
+12 -1
View File
@@ -1,5 +1,16 @@
#ifndef UWS_H3RESPONSEDATA_H
#define UWS_H3RESPONSEDATA_H
namespace uWS {
struct Http3ResponseData {
// will need onWritable
// onData
// hasWrittenStatus
};
}
}
#endif