12 #ifndef ROC_PACKET_INTERLEAVER_H_
13 #define ROC_PACKET_INTERLEAVER_H_
#define ROC_ATTR_NODISCARD
Emit warning if function result is not checked.
Base class for non-copyable objects.
Interleaves packets to transmit them in pseudo random order.
virtual ROC_ATTR_NODISCARD status::StatusCode write(const PacketPtr &packet)
Write next packet.
Interleaver(IWriter &writer, core::IArena &arena, size_t block_size)
Initialize.
size_t block_size() const
Maximum delay between writing packet and moment we get it in output in terms of packets number.
bool is_valid() const
Check if object is successfully constructed.
ROC_ATTR_NODISCARD status::StatusCode flush()
Send all buffered packets to output writer.