Reading/Writing sockets concurrently

ajb at ajb at
Thu Dec 9 21:52:57 EST 2004

G'day all.

Quoting Mårten Dolk <dolk at>:

> I'm trying to create a client application that needs to read and write
> data from a socket. What I want to do is to have one thread reading the
> socket and another thread writing to the same socket, but I can't get it
> to work.

You could take a look at lambdabot:

It has a two-thread structure similar to what you appear to need.  Look
in IRC.hs specifically.

Andrew Bromage

More information about the Glasgow-haskell-users mailing list