Re: [boost] Serialization and disctintion between eof and end of archive

Hello Maciej, I was also faced this problem today.
For the archive to be read correctly, the sender needs to entirely close the connection. This indicates that the end-of-stream condition is used to denote end-of-archive in the serialization sense.
I could solve this by appending an EOF to the archive in order to indicate the peer that end-boundary of this message. my_socket_stream os(...); ar::text_oarchive oa( os); oa << msg; oa << EOF; I hope this is correct. Oliver

This shouldn't be necessary. Robert Ramey Oliver.Kowalke@infineon.com wrote:
Hello Maciej,
I was also faced this problem today.
For the archive to be read correctly, the sender needs to entirely close the connection. This indicates that the end-of-stream condition is used to denote end-of-archive in the serialization sense.
I could solve this by appending an EOF to the archive in order to indicate the peer that end-boundary of this message.
my_socket_stream os(...); ar::text_oarchive oa( os); oa << msg; oa << EOF;
I hope this is correct. Oliver
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Oliver.Kowalke@infineon.com
-
Robert Ramey