[Haskell-cafe] Simple network client
Timo B. Hübel
t.h at gmx.info
Wed Jan 30 08:17:50 EST 2008
On Wednesday 30 January 2008 14:09:31 you wrote:
> > This sounds good, but don't I throw away all (possible) performance gains
> > of transmitting ByteStrings directly when using show/read to convert them
> > to ordinary strings and back?
> Probably not all of them, but some of them, definitely.
> If you want to transmit an arbitrary bytestring then I'm pretty sure
> that transmitting a length word first is the way to go. An arbitrary
> bytestring can have any value in it, so there are no values left to act
> as delimiters :) You'd have to have some kind of escaping mechanism,
> like show, which is expensive.
Okay, then I will go this way. Thank you very much!
More information about the Haskell-Cafe