| 43 | } |
| 44 | |
| 45 | void reset(const void* data, size_t length) |
| 46 | { |
| 47 | using namespace std; // For memcpy. |
| 48 | |
| 49 | BOOST_ASIO_CHECK(length <= max_length); |
| 50 | |
| 51 | memcpy(data_, data, length); |
| 52 | length_ = length; |
| 53 | position_ = 0; |
| 54 | next_read_length_ = length; |
| 55 | } |
| 56 | |
| 57 | void next_read_length(size_t length) |
| 58 | { |
no outgoing calls