LibQuicR
quicr::Connection::Delegate Class Referenceabstract

Async Callback API on the transport. More...

#include <connection.h>

Inheritance diagram for quicr::Connection::Delegate:
quicr::Session

Public Member Functions

virtual ~Delegate ()=default
 Destroy the delegate. More...
 
virtual void OnConnectionStatus (const std::shared_ptr< Connection > &connection, Status status)=0
 Event notification for connection status changes. More...
 
virtual void OnRecvDgram (const std::shared_ptr< Connection > &connection)=0
 callback notification that datagram data has been received and should be processed More...
 
virtual bool OnRecvStream (const std::shared_ptr< Stream > &stream)=0
 callback notification that data has been received and should be processed More...
 
virtual void OnStreamClosed (const std::shared_ptr< Stream > &stream, StreamClosedFlag flag)=0
 Callback notification that a stream has been closed by either FIN or RST. More...
 
virtual void OnConnectionMetricsSampled (const std::shared_ptr< Connection > &connection, const MetricsTimeStamp sample_time, const QuicConnectionMetrics &quic_connection_metrics)=0
 callback notification on connection metrics sampled More...
 
virtual void OnStreamMetricsStampled (const std::shared_ptr< Connection > &connection, const MetricsTimeStamp sample_time, std::uint64_t stream_id, const QuicStreamMetrics &quic_stream_metrics, bool is_final)=0
 callback notification on stream metrics sampled More...
 

Detailed Description

Async Callback API on the transport.

Constructor & Destructor Documentation

◆ ~Delegate()

virtual quicr::Connection::Delegate::~Delegate ( )
virtualdefault

Destroy the delegate.

Member Function Documentation

◆ OnConnectionMetricsSampled()

virtual void quicr::Connection::Delegate::OnConnectionMetricsSampled ( const std::shared_ptr< Connection > &  connection,
const MetricsTimeStamp  sample_time,
const QuicConnectionMetrics &  quic_connection_metrics 
)
pure virtual

callback notification on connection metrics sampled

This callback will be called when the connection metrics are sampled per connection

Parameters
connectionConnection whose metrics were sampled
sample_timeSample time in microseconds
quic_connection_metricsConnection specific metrics for sample period

◆ OnConnectionStatus()

virtual void quicr::Connection::Delegate::OnConnectionStatus ( const std::shared_ptr< Connection > &  connection,
Status  status 
)
pure virtual

Event notification for connection status changes.

Called when the connection changes state/status

Parameters
[in]connectionConnection whose status changed
[in]statusTransport status value

◆ OnRecvDgram()

virtual void quicr::Connection::Delegate::OnRecvDgram ( const std::shared_ptr< Connection > &  connection)
pure virtual

callback notification that datagram data has been received and should be processed

Datagrams share one queue per connection, so there is nothing to identify here beyond the connection itself.

◆ OnRecvStream()

virtual bool quicr::Connection::Delegate::OnRecvStream ( const std::shared_ptr< Stream > &  stream)
pure virtual

callback notification that data has been received and should be processed

Parameters
streamStream the data arrived on, carrying its receive queue and the handler consuming it.
Returns
true if the stream was left with more that can be read now, having stopped short of draining it so as not to starve the others, and so wants another turn

◆ OnStreamClosed()

virtual void quicr::Connection::Delegate::OnStreamClosed ( const std::shared_ptr< Stream > &  stream,
StreamClosedFlag  flag 
)
pure virtual

Callback notification that a stream has been closed by either FIN or RST.

Parameters
streamStream that closed, carrying the handler it belonged to
flagFlag value for how the stream was closed. Values are FIN or RST

Implemented in quicr::Session.

◆ OnStreamMetricsStampled()

virtual void quicr::Connection::Delegate::OnStreamMetricsStampled ( const std::shared_ptr< Connection > &  connection,
const MetricsTimeStamp  sample_time,
std::uint64_t  stream_id,
const QuicStreamMetrics &  quic_stream_metrics,
bool  is_final 
)
pure virtual

callback notification on stream metrics sampled

Called once per stream per sample period, before OnConnectionMetricsSampled for the same period. A track carried by several streams therefore accumulates several of these before its period is complete. A stream that closed during the period reports once more, so one that came and went between two samples still counts towards its track.

Note
Every value covers the period alone, so a running total simply adds each one.
Parameters
connectionConnection the stream belongs to
sample_timeSample time in microseconds
stream_idStream the metrics belong to
quic_stream_metricsStream metrics for sample period
is_finalLast report for this stream; it no longer exists

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