ring

Mutasem Hidmi 2022-01-18T12:48:59.008900Z

Hi guys. Is it possible to add websocket support to a ring webserver?

2022-01-18T12:54:36.009Z

Might be, but I've usually switched to http-kit when needing websockets or server sent events. It is pretty much a drop-in replacement.

dharrigan 2022-01-18T13:01:02.009200Z

Yes, it's very possible.

dharrigan 2022-01-18T13:01:13.009400Z

Have a look at sente as a possible library to consider

dharrigan 2022-01-18T13:01:24.009600Z

Or, yes, http-kit will work too 🙂

dharrigan 2022-01-18T13:02:08.009800Z

I put up an example of using sente with reitit (that uses ring underneath) here:

🎉 1
dharrigan 2022-01-18T13:02:22.010Z

along with using a plain-old-javascript websockets invocation here:

Mutasem Hidmi 2022-01-18T13:04:11.010200Z

Thanks. I will take a look now.