Search code examples
haskellwebsocketyesodhaskell-wai

Which Websockets library to use with Yesod?


I'm wondering if someone could explain the differences between the Haskell websocket libraries and how they work with Yesod.

The two main examples I'm going off are this tutorial for Network.Websockets and the wai websockets package.

I haven't been able to find a good example or tutorial for the wai package. Since yesod uses wai, what advantages does it have over the simple network one? Is it meant to be used instead of, or inconjunction with Network.Websockets?

I've seen examples, but I haven't been able to understand how they actually fit into the yesod environment. If somebody could explain how websockets relate to handlers and IO and such in Yesod, that would be great.

Note: I have seen this question and this question but I can't understand how to apply them, as they don't actually explain where websockets fit into Yesod.


Solution

  • Yesod websockets are now available. "cabal install yesod-websockets" fetches and installs the package. You can read about it at on Michael Snoyman's March 9, 2014 blog at http://www.yesodweb.com/blog/2014/03/wai-yesod-websockets.