[Haskell-cafe] Enumeratee that generates data
greg at gregorycollins.net
Sun Sep 4 18:40:25 CEST 2011
On Sun, Sep 4, 2011 at 6:03 PM, tsuraan <tsuraan at gmail.com> wrote:
> Is my basic model broken here? It's occurred to me that what I
> actually want to do is tie the enumSocket clientSock to an iterSocket
> upstreamSock, do the reverse, and then do two runIteratee calls (one
> in a forkIO, I guess?). That seems uglier, I'm not sure if there
> would be complications in making sure both Iteratees stop running
> correctly. Is that the right way to do, or am I just missing some
> capability that Enumeratees have?
For this specific problem I recommend using a forkIO'd
Iteratee/Enumerator pair with a Chan to shuttle data between them, I
think it's probably the best way of doing it.
Gregory Collins <greg at gregorycollins.net>
More information about the Haskell-Cafe