facebook / proxygen

A collection of C++ HTTP libraries including an easy to use HTTP server.
Other
8.16k stars 1.5k forks source link

Deploying HTTP Server on Windows in 2023 #454

Closed ffreality closed 1 year ago

ffreality commented 1 year ago

Hi, I want to create a HTTP server plugin for Unreal Engine for implementing server features for my simulation / digital twin projects. (For example, I developed an OPC UA client plugin and I want to expose these datas from my digital twin project)

I know that there are other HTTP libraries but if I start to buid a plugin, I prefer to use the one which has newest features. (For example, read me says it supports from HTTP1 to 3)

So, I found proxygen and I want to ask this. Can I create a server for Windows or should I use mvfst ?

HTTP 3 is charming but supporting older ones is necessary for compability.

lnicco commented 1 year ago

Hi @ffreality, thanks for your question.

The HTTPServer class right now only supports HTTP/1 and HTTP/2.

Here is a class you can use that supports all the way to HTTP/3 https://github.com/facebook/proxygen/blob/main/proxygen/httpserver/samples/hq/HQServer.h It does already include mvfst under the hood.

Let me know if the above works for your use-case.

ffreality commented 1 year ago

Hi, thank you for your answer. So, I have to initiate two class for supporting both HTTP 3 and older ones. Okay, makes sense.

But how about Windows support ? We will deploy apps to Windows.

lnicco commented 1 year ago

have to initiate two class for supporting both HTTP 3 and older ones

HQServer should take care of this for you, by encapsulating both an HTTPServer and one that supports HTTP/3

how about Windows support?

The code should be Windows-compatible. We are trying to get around a blocker that is preventing us to enable Github Actions CI for Windows like we already did for mvfst (https://github.com/facebookincubator/mvfst) but you should be able to build it locally