Skip to content

ericpashman/websockets

This branch is 159 commits behind jaspervdj/websockets:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

60705a9 · Feb 24, 2015
Aug 27, 2014
Jan 26, 2015
Feb 23, 2015
Dec 5, 2014
Feb 23, 2013
Sep 23, 2011
Oct 22, 2011
Aug 19, 2012
Feb 24, 2015
Nov 4, 2011
Feb 19, 2015
Sep 8, 2011
Sep 9, 2013
Feb 24, 2015

Repository files navigation

websockets

Introduction

Provides a sensible, clean and simple way to write WebSocket-capable servers in Haskell.

The following program echoes messages back after appending meow:

{-# LANGUAGE OverloadedStrings #-}
import           Control.Monad      (forever)
import qualified Data.Text          as T
import qualified Network.WebSockets as WS

meow :: WS.Connection -> IO ()
meow conn = forever $ do
    msg <- WS.receiveData conn
    WS.sendTextData conn $ msg `T.append` ", meow"

Installation is provided using cabal:

$ cabal install websockets

Authors

An initial WebSockets library was written in 2010 by Siniša Biđin. In 2011, it was rewritten from scratch, and extended to it's current state by Jasper Van der Jeugt, who is also the current maintainer.

Contributors:

  • Alex Lang
  • Fedor Gogolev
  • Nathan Howell
  • Steffen Schuldenzucker
  • Yi Huang
  • Carl Chatfield

Development

Pull requests are always welcome!

This library is production-quality. Therefore we have very high standards in terms of code style, API quality and testing.

We have two kinds of tests: Haskell-based tests (tests/haskell), which use the test-framework library. Additionally, there are integration tests available in tests/javascript, which require a browser to run.

About

A Haskell library for creating WebSocket-capable servers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Haskell 86.1%
  • JavaScript 5.9%
  • HTML 4.8%
  • CSS 2.8%
  • Shell 0.4%