| 43 | } |
| 44 | |
| 45 | bool frame_queue::packet_ready() |
| 46 | { |
| 47 | if (!nextsize) { |
| 48 | if (size() < sizeof(framesize_t)) |
| 49 | return false; |
| 50 | auto szbuf = read(sizeof(framesize_t)); |
| 51 | std::memcpy(&nextsize, &szbuf[0], sizeof(framesize_t)); |
| 52 | if (!nextsize) |
| 53 | throw frame_queue_exception(); |
| 54 | } |
| 55 | if (size() >= nextsize) |
| 56 | return true; |
| 57 | else |
| 58 | return false; |
| 59 | } |
| 60 | |
| 61 | buffer_t frame_queue::read_packet() |
| 62 | { |
no test coverage detected