Hello.

I've also written simple chat server based on conduits and stm channels

https://github.com/qnikst/chat-server/blob/master/src/Main.hs

it has quite similar aproach and maybe this solution can be used together
to have better results.

--
Alexander Vershilov

Sat, Mar 03, 2012 at 02:05:17AM -0500, Joey Adams wrote
> 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

Attachment: signature.asc
Description: Digital signature

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

Reply via email to