Reading/Writing sockets concurrently

ajb at spamcop.net ajb at spamcop.net
Thu Dec 9 21:52:57 EST 2004


G'day all.

Quoting Mårten Dolk <dolk at dtek.chalmers.se>:

> 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:

        http://www.scannedinavian.org/repos/lambdabot/lambdabot/

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

Cheers,
Andrew Bromage


More information about the Glasgow-haskell-users mailing list