Add some Http3 skeleton

This commit is contained in:
Alex Hultman
2022-05-02 23:32:55 +02:00
parent e4c6fbf8de
commit b46a456393
7 changed files with 88 additions and 1 deletions
+33
View File
@@ -0,0 +1,33 @@
#include "App.h"
#include "Http3Response.h"
#include "Http3Request.h"
#include "Http3Context.h"
namespace uWS {
struct QuicApp {
Http3Context *http3Context;
QuicApp(SocketContextOptions options = {}) {
/* Create the http3 context */
http3Context = Http3Context::create((us_loop_t *)Loop::get(), options);
}
QuicApp &listen(int port, std::function<void(void *)> cb) {
return *this;
}
QuicApp &get(std::string path, std::function<void(Http3Response *, Http3Request *)> cb) {
// http3Context->onHttp, internally using httprouter
return *this;
}
void run() {
}
};
}