|
Boost : |
From: Scott Woods (scottw_at_[hidden])
Date: 2004-12-28 22:46:47
Hi,
I have been doing a lot of async messaging over TCP and have looked
through the serialization library in the hope that it could be applied to the
task.
If the serialized representation of an object has an unknown length
then its reasonable to say that we dont know how many network
blocks will be consumed, i.e. the receiver may read 1 or more blocks
before completion. We also cant guarantee that the flurry of recv's
that might result from an FD_READ (sorry to those non-Windows folks),
will neatly terminate on an object boundary.
IMHO the input function (operator>>) needs to be "re-entrant" if
serialization can be used in an async environment. Repeated calls
should be perfectly acceptable. Ultimately it would return an indication
that a complete object has indeed been loaded. Some "state" needs to
be held somewhere. My best guess is that this is not the case but I cant
find anything conclusive (without wading deeper into code).
Can anyone comment?
ps:
Its a thoroughly amazing library.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk