26 Mar
2009
26 Mar
'09
1:29 p.m.
And wouldn't that affect performance in some way?
I can't see how it would affect performance, but the real answer you will get from performance tests.
I've read somewhere, that i will not be able to get just the first byte, that i would probably get some more
boost::array<char, 1> buff_;// member //... socket_.async_receive(boost::asio::buffer(buff), handler); //... When the handler() is called, buff_ can't contain more that 1 byte, as its size is 1 byte. Of course, you can supply asio::streambuf as a buffer. It's built on top of std::vector, and it auto-resizes as needed during data receiving. See asio examples for details. (Eg., http://www.boost.org/doc/libs/1_38_0/doc/html/boost_asio/example/http/client...)