$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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