Wrap more h3, bump uSockets, remove old stuff, add SSL cert
This commit is contained in:
+8
-1
@@ -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
@@ -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
@@ -1,5 +1,16 @@
|
||||
#ifndef UWS_H3RESPONSEDATA_H
|
||||
#define UWS_H3RESPONSEDATA_H
|
||||
|
||||
namespace uWS {
|
||||
struct Http3ResponseData {
|
||||
|
||||
|
||||
// will need onWritable
|
||||
// onData
|
||||
|
||||
// hasWrittenStatus
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user