From: Glyn M. <gly...@gm...> - 2008-11-03 19:47:04
|
Hi Rodrigo, 2008/11/3 Rodrigo Madera <rod...@gm...> > > So are you saying that storing a binary block of data (say an image) into a > string is okay? > Boost has a buffer class made for this. If you want integration with boost > you need to use boost. > > It makes no sense at all to put strings into every message. > It's possible to specialize the message to support different containers. Something like this: namespace boost { namespace network { template <> struct string<binary_parser_tag> { typedef boost::array<T, 1024> type; }; }} Or whatever structure suits your needs. See <boost/network/message/traits/string.hpp> Glyn |