Boost logo

Boost Users :

From: Aaron W. LaFramboise (aaronrabiddog51_at_[hidden])
Date: 2007-05-22 01:17:01


bringiton bringiton wrote:

> Are there any solutions to this? ie building messages as they come in
> through the TCP stream.

Parse data from a socket stream the same way you'd parse data from any
other sort of stream, such as a file. That is, design the protocol such
that end-points can parse the message using its own contents, rather
than meta-data such as 'messages.'

Possibilities:
1) Use delimiters.
   A. Use text and use CRLF for a delimiter.
   B. Use a special octet as a delimiter, such as the null character.
2) Use message content-length


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net