On Fri, Mar 2, 2012 at 7:34 PM, Joey Adams <joeyadams3.14...@gmail.com> wrote:
> I'll try to put together a simple chat server example, like the one I
> wrote for stm-channelize.

Here it is:

    https://github.com/joeyadams/haskell-chat-server-example

See, in particular, the serveLoop function.  When a message is
received from the client, it is written to the send channel of every
other client.  When a message is written on the client's own send
channel, it is transmitted to the client.  The primary thread for the
client waits until one of the worker threads signals completion, then
kills both of the worker threads.

I hope this example gives you some ideas.

-Joey

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to