[Haskell-beginners] Network client - reading and writing to a socket
Manfred Lotz
manfred.lotz at arcor.de
Sun Jul 31 19:20:06 CEST 2011
On Sun, 31 Jul 2011 12:42:45 -0400
David Place <d at vidplace.com> wrote:
> Shouldn't be laziness that is biting you. You are using strict
> ByteStrings. I'm stumped! Did you try artificially inserting
> something like this to force c and c'?
>
> On Jul 31, 2011, at 12:25 PM, Manfred Lotz wrote:
>
> > recvMsg h = do
> > c <- B.hGet h 1
> > hFlush h
>
> print c
>
> > c' <- B.hGetNonBlocking h 40000
>
> print c'
>
> > hFlush h
> > return $ B.concat [c,c']
>
>
Didn't help either.
If I add another
resp4 <- recvMsg h
B.putStrLn resp4
at the end of imapDialog then I get the rest of the message.
--
Manfred
More information about the Beginners
mailing list