| 25 | namespace { |
| 26 | |
| 27 | std::pair<size_t, byte_span> split(byte_span buffer) noexcept { |
| 28 | CAF_ASSERT(buffer.size() >= sizeof(uint32_t)); |
| 29 | auto u32_size = uint32_t{0}; |
| 30 | memcpy(&u32_size, buffer.data(), sizeof(uint32_t)); |
| 31 | auto msg_size = static_cast<size_t>(detail::from_network_order(u32_size)); |
| 32 | return std::make_pair(msg_size, buffer.subspan(sizeof(uint32_t))); |
| 33 | } |
| 34 | |
| 35 | class framing_impl : public framing { |
| 36 | public: |
no test coverage detected