Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::packet::Router Class Reference

Route packets to writers. More...

#include <router.h>

Inheritance diagram for roc::packet::Router:
Collaboration diagram for roc::packet::Router:

Public Member Functions

 Router (core::IAllocator &allocator, size_t max_routes)
 Initialize. More...
bool valid () const
 Check if object is successfully constructed. More...
bool add_route (IWriter &writer, unsigned flags)
 Add route. More...
virtual void write (const PacketPtr &packet)
 Write next packet. More...

Detailed Description

Route packets to writers.

Definition at line 26 of file router.h.

Constructor & Destructor Documentation

roc::packet::Router::Router ( core::IAllocator allocator,
size_t  max_routes 


Member Function Documentation

bool roc::packet::Router::add_route ( IWriter writer,
unsigned  flags 

Add route.

Packets that has given flags set will be routed to writer.
bool roc::packet::Router::valid ( ) const

Check if object is successfully constructed.

virtual void roc::packet::Router::write ( const PacketPtr packet)

Write next packet.

Route packet to a writer or drop it if no routes found.

Implements roc::packet::IWriter.

The documentation for this class was generated from the following file: