Search code examples
haskellihp

IHP - How to send and receive data between clients via custom Web Socket controller?


I'm building a chat application with a custom web socket controller and I want to establish a two way communication between different clients with the server in the middle in such a way that whenever a client sends a request, it gets updated on the server and the server emits a response to all the clients.

Note: I've tried using IHP's Auto Refresh but using that is turning out to be quite expensive for my use case so that's why I'm trying to set up a custom web socket controller.


Solution

  • Check out the new IHP DataSync API: https://ihp.digitallyinduced.com/Guide/realtime-spas.html

    It's higher level than websockets but likely can help you implement the chat app.