[Haskell-cafe] Protocol buffer network examples
mads.lindstroem at gmail.com
Tue Oct 12 16:35:28 EDT 2010
I am trying to read and write delimited messages using
protocol-buffers [1,2] over a socket. I have managed to write delimited
messages and I was looking for examples of reading delimited messages.
Maybe somebody has an example of reading delimited messages from a
The Haskell protocol-buffer package mostly uses bytestrings, but I
need to read from a socket. Of cause, I can use the bytestring package
to read X number of bytes from a socket-handle. But it is impossible to
know what X is, before you start parsing the message, as even integers
are variable length in protocol buffers.
Hope somebody can help,
 Delimited messages is a protocol buffers technique, where one writes
the size of the message before the actual message:
More information about the Haskell-Cafe