roo_transport
API Documentation for roo_transport
Loading...
Searching...
No Matches
roo_transport::PacketSender Class Referenceabstract

Abstraction for sending packets over an underlying medium. More...

#include <packet_sender.h>

Inheritance diagram for roo_transport::PacketSender:
[legend]

Public Member Functions

virtual ~PacketSender ()=default
 
virtual void send (const roo::byte *buf, size_t len)=0
 Sends one data packet.
 
virtual void flush ()
 Flushes pending output.
 

Static Public Attributes

static constexpr int kMaxPacketSize = 250
 Maximum packet size that can be sent.
 

Detailed Description

Abstraction for sending packets over an underlying medium.

Packets are up to kMaxPacketSize bytes. Implementations may use unreliable media where loss/corruption can occur.

Definition at line 13 of file packet_sender.h.

Constructor & Destructor Documentation

◆ ~PacketSender()

virtual roo_transport::PacketSender::~PacketSender ( )
virtualdefault

Member Function Documentation

◆ flush()

virtual void roo_transport::PacketSender::flush ( )
inlinevirtual

Flushes pending output.

Reimplemented in roo_transport::PacketSenderOverStream.

Definition at line 24 of file packet_sender.h.

◆ send()

virtual void roo_transport::PacketSender::send ( const roo::byte *  buf,
size_t  len 
)
pure virtual

Sends one data packet.

Implemented in roo_transport::PacketSenderOverStream.

Field Documentation

◆ kMaxPacketSize

constexpr int roo_transport::PacketSender::kMaxPacketSize = 250
staticconstexpr

Maximum packet size that can be sent.

Definition at line 16 of file packet_sender.h.


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