[Haskell-cafe] Simple network client
reinier.lamers at phil.uu.nl
Wed Jan 30 07:27:00 EST 2008
Timo B. Hübel wrote:
> On Wednesday 30 January 2008 13:03:27 you wrote:
>> Just don't use hGetContents in any serious code, or any program longer
>> than 4 lines.
> What else do you suggest? I just want to read something out of the socket
> without knowing it's length beforehand (my example here used ordinary
> Strings, but actually I want to do it with ByteStrings).
Either tell the receiving end how much it has to receive, or use a
text-based protocol and getLine.
More information about the Haskell-Cafe