From: Rodrigo M. <rod...@gm...> - 2008-11-03 22:19:15
|
> > 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> > > So why not make this a buffer (or array) directly? Why have you choosen this string specialization path? Thank you, Rodrigo |