@returns 0 on success, the result of rcv_buffer::insert(..) once it failed
| 81 | |
| 82 | /// @returns 0 on success, the result of rcv_buffer::insert(..) once it failed |
| 83 | int addMessage(size_t msg_len_pkts, int msgno, int start_seqno, bool out_of_order = false, int ts = 0) |
| 84 | { |
| 85 | for (size_t i = 0; i < msg_len_pkts; ++i) |
| 86 | { |
| 87 | const bool pb_first = (i == 0); |
| 88 | const bool pb_last = (i == (msg_len_pkts - 1)); |
| 89 | const int res = addPacket(start_seqno + int(i), msgno, pb_first, pb_last, out_of_order, ts); |
| 90 | |
| 91 | if (res != 0) |
| 92 | return res; |
| 93 | } |
| 94 | return 0; |
| 95 | } |
| 96 | |
| 97 | void generatePayload(char* dst, size_t len, int seqno) { std::iota(dst, dst + len, (char)seqno); } |
| 98 |
nothing calls this directly
no outgoing calls
no test coverage detected