From: Rob Stewart (stewart_at_[hidden])
Date: 2005-04-26 11:57:57
From: "Iain K. Hanson" <ikh_at_[hidden]>
> Using iostreams there must be a buffer ( usually a streambuf ). The buffer size
> *must* be equal tp the MSS / path MTU.
> As the application protocol writter you have to know how much you have written to
> the buffer *at all times* and you must know when an overflow / flush will happen.
> Errors can *only* happen when the buffer writes to the socket ( overflow/flush )
> therefore if a programmer does his/her job correctly there will not be multiple
> operator << traversing and overflow boundary. This is irrespective of sync/async.
According to this, there is no way to use streams with sockets.
Otherwise, clients of the stream interface would need to keep
track of the size of formatted output of each object inserted on
the stream to avoid overflow between insertion operators. How
can they do that?
-- Rob Stewart stewart_at_[hidden] Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk