[Haskell-beginners] Still wrestling with lazy IO
kc1956 at gmail.com
Sat Jun 18 21:47:19 CEST 2011
There is a chapter on this in the book "Real World Haskell" which I
believe is also online. :)
On Sat, Jun 18, 2011 at 12:37 PM, Raphael Päbst
<raphael.paebst at googlemail.com> wrote:
> I am currently using line buffering and I tried hFlush on both server
> and client side so far.
> On 6/18/11, Antoine Latter <aslatter at gmail.com> wrote:
>> On Sat, Jun 18, 2011 at 1:01 PM, Raphael Päbst
>> <raphael.paebst at googlemail.com> wrote:
>>> Hey everyone!
>>> Sorry for asking more or less the same question again, but I'm still
>>> stuck wrestling with lazy IO.
>>> What I'm trying to do is the following:
>>> sending a Bytestring to a server, via TCP
>>> Do stuff with the Bytestring that results in another Bytestring
>>> Send that new Bytestring back to the original client.
>>> At the moment this all happens inside an IO handle and doesn't work.
>>> The stuff on the server side only gets executed, once the handle is
>>> closed on the client's side and therefore the response is lost
>> Have you looked at how you're buffering the handles? Have you
>> experimented with changing the buffering mode or using the hFlush
>>> It's a very simple program otherwise and so I don't want to get too
>>> much into iteratees, iterators and that stuff, since it feels like
>>> Is there a way to get this working in the way I'm currently trying?
>>> Or can I do this in a strict way?
>>> Thanks again
>>> Beginners mailing list
>>> Beginners at haskell.org
> Beginners mailing list
> Beginners at haskell.org
More information about the Beginners