SatCat5
satcat5::io::BufferedPackets Class Referencefinal

Detailed Description

Copy packets from a Readable source to a network address.

Given a buffered source of data, read each packet from the source and write it to the designated net::Address. For a similar class that ignores packet boundaries,

See also
BufferedStream.

Definition at line 161 of file io_buffer.h.

#include <io_buffer.h>

Inheritance diagram for satcat5::io::BufferedPackets:
[legend]
Collaboration diagram for satcat5::io::BufferedPackets:
[legend]

Public Member Functions

 BufferedPackets (satcat5::io::Readable *src, satcat5::net::Address *dst)
 Set source, destination, APID, and chunk-size. More...
 

Protected Member Functions

void data_rcvd (satcat5::io::Readable *src) override
 The data_rcvd() callback is polled whenever data is available. More...
 
void data_unlink (satcat5::io::Readable *src) override
 Unlink this EventListener from the designated source, because the designated Readable object is being destroyed. More...
 

Protected Attributes

satcat5::io::Readablem_src
 
satcat5::net::Address *const m_dst
 

Constructor & Destructor Documentation

◆ BufferedPackets()

BufferedPackets::BufferedPackets ( satcat5::io::Readable src,
satcat5::net::Address dst 
)

Set source, destination, APID, and chunk-size.

Default sets max_chunk to 512 bytes and ignores min_txnow.

Definition at line 101 of file io_buffer.cc.

Member Function Documentation

◆ data_rcvd()

void BufferedPackets::data_rcvd ( satcat5::io::Readable src)
overrideprotectedvirtual

The data_rcvd() callback is polled whenever data is available.

A pointer is provided to assist handlers with multiple sources. Child objects of io::EventListener MUST override this method.

Implements satcat5::io::EventListener.

Definition at line 116 of file io_buffer.cc.

◆ data_unlink()

void BufferedPackets::data_unlink ( satcat5::io::Readable src)
overrideprotectedvirtual

Unlink this EventListener from the designated source, because the designated Readable object is being destroyed.

Child objects of io::EventListener MAY override this method if action is required.

Reimplemented from satcat5::io::EventListener.

Definition at line 125 of file io_buffer.cc.


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