Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP server #48

Closed
wants to merge 6 commits into from
Closed

HTTP server #48

wants to merge 6 commits into from

Conversation

brandonros
Copy link

@brandonros brandonros commented Sep 14, 2019

Part of #44

I copied your Udp class to make a HttpServer class that takes (host, port) as arguments.

Now I'm working on blending https://github.com/parachvte/libuv-httpserver/blob/master/httpserver.c and https://github.com/h2o/picohttpparser#phr_parse_request

HttpServer will call onrequest when a request is parsed through picohttpparser

@saghul
Copy link
Owner

saghul commented Sep 16, 2019

Hey Brandon,

Before you make it any further: as I mentioned in #44 (comment) I really don't want a homegrown HTTP server right now.

It has wasy too much complexity (if we are going to do it right) which I'd rather not have, and stand on shoulders of giants.

HTTP 1 (and 1.1) is reasonably simple, but then we also need HTTPS. And WebSockets, and HTTP/2. And in the meantime, HTTP/3 is on the way, using QUIC.

That's just too much. If we use something like libwebsockets, we get HTTP(S), WS and HTTP/2 for free. And thanks to the libuv integration we don't need to worry about threads or another event loop, pretty much like the integration with CURL.

Is this something that spikes your interest?

@brandonros brandonros closed this Sep 23, 2019
@brandonros brandonros deleted the libwebsockets branch September 23, 2019 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants