diff --git a/Makefile b/Makefile index c8e6233..d333866 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,11 @@ ifeq ($(WITH_PROXY),1) override CXXFLAGS += -DUWS_WITH_PROXY endif +# WITH_QUIC enables experimental Http3 examples +ifeq ($(WITH_QUIC),1) + override CXXFLAGS += -DLIBUS_USE_QUIC +endif + # WITH_LIBDEFLATE=1 enables fast paths for SHARED_COMPRESSOR and inflation ifeq ($(WITH_LIBDEFLATE),1) override CXXFLAGS += -I libdeflate -DUWS_USE_LIBDEFLATE diff --git a/examples/Http3Server.cpp b/examples/Http3Server.cpp index 540cfd5..fc424de 100644 --- a/examples/Http3Server.cpp +++ b/examples/Http3Server.cpp @@ -1,3 +1,5 @@ +#ifdef LIBUS_USE_QUIC + /* Do not rely on this API, it will change */ #include "Http3App.h" #include @@ -18,3 +20,13 @@ int main() { std::cout << "Failed to listen on port 3000" << std::endl; } + +#else + +#include + +int main() { + printf("Compile with WITH_QUIC=1 WITH_BORINGSSL=1 make in order to build this example\n"); +} + +#endif \ No newline at end of file