[Haskell-cafe] Enumeratee that generates data

Gregory Collins greg at gregorycollins.net
Sun Sep 4 21:35:45 CEST 2011


On Sun, Sep 4, 2011 at 7:09 PM, tsuraan <tsuraan at gmail.com> wrote:
>> 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.
>
> Googling for "enumerator chan" gives me this gist (written by you in
> April): https://gist.github.com/932384 .  Is that what you're
> thinking?  Have each socket's read and write tied to a chan enumerator
> or iterator as appropriate, and steer the data around as desired?  My
> actual problem involved multiple upstream server and merging the data
> from all of them, so I think, assuming I'm understanding you
> correctly, that this would make a lot of sense.

I think that's roughly what I had in mind, yes.

G
-- 
Gregory Collins <greg at gregorycollins.net>



More information about the Haskell-Cafe mailing list