In-process transport

See the Python documentation for an overview of the in-process transport.

class inproc_queue

Queue for packets being passed within the process.

While the data members are public, this is only to allow the send and receive code (and unit tests) to access the data. Users are advised to treat the data members as opaque.

Public Functions

void add_packet(packet &&pkt)

Add a packet directly to the queue.

void stop()

Indicate end-of-stream to receivers.

It is an error to add any more packets after this.

Sending

class inproc_stream : public spead2::send::stream

Public Functions

inproc_stream(io_service_ref io_service, const std::vector<std::shared_ptr<inproc_queue>> &queues, const stream_config &config = stream_config())

Constructor.

Private Functions

detail::queue_item *get_queue(std::size_t idx)

Access a (valid) item from the queue (takes care of masking the index)

Receiving

class inproc_reader : public spead2::recv::reader

Stream reader that receives packets from an inproc_queue.

Public Functions

inproc_reader(stream &owner, std::shared_ptr<inproc_queue> queue)

Constructor.