Skip to content

banacorn/socket.io-haskell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

socket.io for haskell folks

Resources

License

Stars

Watchers

Forks

Packages

No packages published