roo_transport
API Documentation for roo_transport
Loading...
Searching...
No Matches
roo_transport::internal::Transmitter Class Reference

#include <transmitter.h>

Public Types

enum  State { kIdle = 0 , kConnecting = 1 , kConnected = 2 , kBroken = 3 }
 

Public Member Functions

 Transmitter (unsigned int sendbuf_log2)
 
void reset ()
 
void init (uint32_t my_stream_id, SeqNum new_start)
 
uint32_t packets_sent () const
 
uint32_t packets_delivered () const
 
size_t tryWrite (const roo::byte *buf, size_t count, bool &made_space)
 
size_t availableForWrite () const
 
bool flush ()
 
bool hasPendingData () const
 
void close ()
 
void setConnected (uint16_t peer_receive_buffer_size, bool control_bit)
 
void setBroken ()
 
State state () const
 
uint32_t my_stream_id () const
 
const OutBuffergetBufferToSend (long &next_send_micros)
 
size_t send (roo::byte *buf, long &next_send_micros)
 
SeqNum front () const
 
bool ack (bool control_bit, uint16_t seq_id, const roo::byte *ack_bitmap, size_t ack_bitmap_len)
 
bool updateRecvHimark (bool control_bit, uint16_t recv_himark)
 

Detailed Description

Definition at line 11 of file transmitter.h.

Member Enumeration Documentation

◆ State

Enumerator
kIdle 
kConnecting 
kConnected 
kBroken 

Definition at line 13 of file transmitter.h.

Constructor & Destructor Documentation

◆ Transmitter()

roo_transport::internal::Transmitter::Transmitter ( unsigned int  sendbuf_log2)

Definition at line 9 of file transmitter.cpp.

Member Function Documentation

◆ ack()

◆ availableForWrite()

size_t roo_transport::internal::Transmitter::availableForWrite ( ) const

Definition at line 98 of file transmitter.cpp.

References kBroken, kIdle, and roo_transport::internal::RingBuffer::slotsFree().

◆ close()

void roo_transport::internal::Transmitter::close ( )

◆ flush()

bool roo_transport::internal::Transmitter::flush ( )

Definition at line 57 of file transmitter.cpp.

References roo_transport::internal::OutBuffer::flush().

Referenced by close().

◆ front()

SeqNum roo_transport::internal::Transmitter::front ( ) const
inline

Definition at line 71 of file transmitter.h.

References roo_transport::internal::RingBuffer::begin().

◆ getBufferToSend()

◆ hasPendingData()

bool roo_transport::internal::Transmitter::hasPendingData ( ) const

Definition at line 65 of file transmitter.cpp.

References roo_transport::internal::RingBuffer::empty().

◆ init()

◆ my_stream_id()

uint32_t roo_transport::internal::Transmitter::my_stream_id ( ) const
inline

Definition at line 66 of file transmitter.h.

Referenced by init().

◆ packets_delivered()

uint32_t roo_transport::internal::Transmitter::packets_delivered ( ) const
inline

Definition at line 42 of file transmitter.h.

◆ packets_sent()

uint32_t roo_transport::internal::Transmitter::packets_sent ( ) const
inline

Definition at line 40 of file transmitter.h.

◆ reset()

void roo_transport::internal::Transmitter::reset ( )

◆ send()

size_t roo_transport::internal::Transmitter::send ( roo::byte *  buf,
long next_send_micros 
)

◆ setBroken()

void roo_transport::internal::Transmitter::setBroken ( )

◆ setConnected()

void roo_transport::internal::Transmitter::setConnected ( uint16_t  peer_receive_buffer_size,
bool  control_bit 
)
inline

Definition at line 54 of file transmitter.h.

References roo_transport::internal::RingBuffer::begin(), and kConnected.

◆ state()

State roo_transport::internal::Transmitter::state ( ) const
inline

Definition at line 64 of file transmitter.h.

◆ tryWrite()

◆ updateRecvHimark()

bool roo_transport::internal::Transmitter::updateRecvHimark ( bool  control_bit,
uint16_t  recv_himark 
)

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