Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 711 Bytes

README.md

File metadata and controls

35 lines (20 loc) · 711 Bytes

Socket.IO server in Haskell.

Build Status

Install

cabal install socketio

Usage

Now only stand-alone version is supported. WAI and Snap adapter will added in the future.

Stand-alone server

{-# 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
    

Supported Transports

websockets under development.

  • xhr-polling