Re: [asio-users] MutableBufferSequence concept and STL iterators
Brought to you by:
chris_kohlhoff
From: Timenkov Y. <yti...@gm...> - 2010-01-11 13:59:10
|
Just add a couple of typedefs to your buffer to meet MutableBufferSequence<http://www.boost.org/doc/libs/1_41_0/doc/html/boost_asio/reference/MutableBufferSequence.html>(or const) requirements. For example, look at the implementation of custom buffer: http://www.boost.org/doc/libs/1_41_0/doc/html/boost_asio/example/buffers/reference_counted.cpp On Mon, Jan 11, 2010 at 12:19 PM, Igor R <boo...@gm...> wrote: > > I wanted to eliminate the extra explicit encapsulation and just write > > asio::write(socket, my_buffer) instead of asio::write(socket, > asio::buffer(my_buffer)). > > asio::write() accepts a sequence of buffers, while your "my_buffer" is > just a single buffer, IIUC, so you need an adapter anyway. > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > asio-users mailing list > asi...@li... > https://lists.sourceforge.net/lists/listinfo/asio-users > |