nitely / nim-hyperx

Pure Nim http2 client and server 🖖
MIT License
23 stars 0 forks source link

Implement WebSockets #11

Open nitely opened 2 weeks ago

nitely commented 2 weeks ago

Not sure how useful this is, WS over http2 seems supported by firefox and chrome at least.

For the hyperx client/server is kinda pointless, http2 supports sending any number of data frames back and forth over a single stream.

nitely commented 2 weeks ago

There is also fetch streaming on browsers but for some reason they restricted it to half duplex, you either stream the request data or the response data, but not both. If full duplex is ever supported, it could replace websocket use cases. See https://github.com/whatwg/fetch/issues/1254

Well, half-duplex does allow to create a stream for receiving and one for sending, but then the server needs a way to associate both streams, like some sort of ID and possibly an external pub/sub, which makes things a lot more complex than they should be.