Socket.IO server in Haskell.
cabal install socketio
Now only stand-alone version is supported. WAI
and Snap
adapter will added in the future.
{-# LANGUAGE OverloadedStrings #-}
import Web.SocketIO
main = server 4000 $ do
on "ping" $ emit "pong" []
-- msg :: CallbackM [Text]
on "echo" $ msg >>= emit "pong"
-- do some IO
on "Kim Jong-Un" $ liftIO launchMissile
websockets
under development.
xhr-polling