Example chat server demonstrating async I/O and STM in Haskell
Haskell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
Main.hs
README.md Added README.md, based on .cabal description Mar 3, 2012
Setup.hs
chat-server-example.cabal Require stm >= 2.3, to remove that CPP block which conditionally defi… Oct 21, 2012

README.md

A simple chat server demonstrating asynchronous I/O (via threads) and STM.

What it does:

  • Listens for connections on port 1234.

  • When a client connects, it asks for their name.

  • If another client with the same name is already disconnected, that client is kicked out to make way for the new client.

  • Any lines the client sends are broadcast to all other clients.

  • Connect and disconnect notices are broadcast as well.