| 67 | // in the mb to complete the operation. Continuation pointers are followed. |
| 68 | template <typename T> |
| 69 | bool mb_peek(T& dest, const ACE_Message_Block& mb, size_t offset, const Encoding& encoding) |
| 70 | { |
| 71 | for (const ACE_Message_Block* iter = &mb; iter; iter = iter->cont()) { |
| 72 | const size_t len = iter->length(); |
| 73 | if (len > offset) { |
| 74 | return mb_copy(dest, *iter, offset, encoding); |
| 75 | } |
| 76 | offset -= len; |
| 77 | } |
| 78 | return false; |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL |