|
LibQuicR
|
Callback interface for session events specific to server mode. More...
#include <session_callbacks.h>
Public Member Functions | |
| virtual | ~ServerCallbacks ()=default |
| Destroy the server callback interface. More... | |
| virtual void | OnStreamClosed (std::uint64_t stream_id, StreamClosedFlag flag) |
| Notify that a server-side QUIC stream closed. More... | |
| virtual Reply< std::vector< TrackNamespace >, RequestErrorCode > | SubscribeNamespaceReceived (const std::shared_ptr< Session > &session, const TrackNamespace &prefix_namespace, const SubscribeNamespaceAttributes &attributes) |
| Callback notification for new subscribe namespace received. More... | |
| virtual Reply< std::vector< TrackNamespace >, RequestErrorCode > | SubscribeTracksReceived (const std::shared_ptr< Session > &session, const TrackNamespace &prefix_namespace, const SubscribeNamespaceAttributes &attributes) |
| Callback notification for new subscribe tracks received. More... | |
| virtual Reply< SubscribeResponse, RequestErrorCode > | SubscribeReceived (const std::shared_ptr< Session > &session, std::uint64_t request_id, const FullTrackName &track_full_name, const SubscribeAttributes &subscribe_attributes) |
| Callback notification for new subscribe received. More... | |
| virtual Reply< void, ErrorCode > | NewGroupRequested (const FullTrackName &track_full_name, std::uint64_t group_id) |
| New group requested received by a subscription. More... | |
| virtual void | PublishNamespaceDoneReceived (const std::shared_ptr< Session > &session, std::uint64_t request_id) |
| Callback notification for publish namespace done received. More... | |
| virtual void | UnsubscribeNamespaceReceived (const std::shared_ptr< Session > &session, const TrackNamespace &prefix_namespace) |
| Callback notification for unsubscribe namespace received. More... | |
| virtual void | UnsubscribeReceived (const std::shared_ptr< Session > &session, std::uint64_t request_id) |
| Callback notification on unsubscribe received. More... | |
| virtual void | PublishDoneReceived (const std::shared_ptr< Session > &session, std::uint64_t request_id) |
| Callback notification on publish done received. More... | |
| virtual Expected< void, Error< ErrorCode > > | SetupReceived (const std::shared_ptr< Session > &session, const SetupAttributes &setup_attributes) |
| Callback on receipt of the peer's SETUP message. More... | |
| virtual void | StatusChanged (const std::shared_ptr< Session > &session, Status status) |
| Callback notification for status/state change. More... | |
| virtual void | MetricsSampled (const std::shared_ptr< Session > &session, const ConnectionMetrics &metrics) |
| Notification callback to provide sampled connection metrics. More... | |
| virtual Reply< const PublishResponse, PublishErrorCode > | PublishReceived (const std::shared_ptr< Session > &session, std::uint64_t request_id, const PublishAttributes &publish_attributes, std::weak_ptr< SubscribeNamespaceHandler > sub_ns_handler) |
| Callback notification for new publish received. More... | |
| virtual Reply< void, PublishNamespaceErrorCode > | PublishNamespaceReceived (const std::shared_ptr< Session > &session, const TrackNamespace &track_namespace, const PublishNamespaceAttributes &publish_namespace_attributes) |
| Callback notification for announce received by subscribe namespace. More... | |
| virtual Reply< const FetchResponse, FetchErrorCode > | StandaloneFetchReceived (const std::shared_ptr< Session > &session, std::uint64_t request_id, const FullTrackName &track_full_name, const StandaloneFetchAttributes &attributes) |
| Event to run on receiving a Standalone Fetch request. More... | |
| virtual Reply< const FetchResponse, FetchErrorCode > | JoiningFetchReceived (const std::shared_ptr< Session > &session, std::uint64_t request_id, const FullTrackName &track_full_name, const JoiningFetchAttributes &attributes) |
| Event to run on receiving a Joining Fetch request. More... | |
| virtual Reply< void, FetchErrorCode > | FetchCancelReceived (const std::shared_ptr< Session > &session, std::uint64_t request_id) |
| Callback notification on receiving a FetchCancel message. More... | |
| virtual Reply< TrackStatusResponse, RequestErrorCode > | TrackStatusReceived (const std::shared_ptr< Session > &session, const FullTrackName &track_full_name) |
| Callback notification for track status message received. More... | |
Callback interface for session events specific to server mode.
|
virtualdefault |
Destroy the server callback interface.
|
virtualinherited |
Callback notification on receiving a FetchCancel message.
| request_id | Request ID received. |
| session | Session that received the cancellation. |
|
virtualinherited |
Event to run on receiving a Joining Fetch request.
Defaults to rejecting with kInternalError, since fetch is not served unless implemented.
| request_id | Request ID received. |
| session | Session that received the request. |
| track_full_name | Track full name |
| attributes | Fetch attributes received. |
|
virtualinherited |
Notification callback to provide sampled connection metrics.
Invoked every Config::metrics_sample_ms in either client or server mode. The period based metrics reset after this callback, so a value not read here is lost. Per track metrics for the same period follow this call, via PublishTrackHandler::MetricsSampled and SubscribeTrackHandler::MetricsSampled, sharing the same last_sample_time.
Invoked on the transport notify thread, which also carries stream and connection events. Return promptly; a slow implementation backs the queue up and other notifications are dropped to make room.
| session | The session the metrics belong to |
| metrics | Copy of the connection metrics for the sample period |
|
virtual |
New group requested received by a subscription.
Server mode only.
| track_full_name | Track full name |
| group_id | Group ID requested — should be plus one of current group or zero |
|
virtual |
Notify that a server-side QUIC stream closed.
| stream_id | Identifier of the closed stream. |
| flag | Event that closed the stream direction. |
Reimplemented from quicr::Session::Callbacks.
|
virtual |
Callback notification on publish done received.
Server mode only.
| request_id | Request ID received |
| session | Session that received the notification. |
|
virtual |
Callback notification for publish namespace done received.
Server mode only. The callback will indicate that publish namespace done has been received. The app is responsible for forwarding a copy of the publish namespace done message to the subscribe namespace connections whose prefix matches.
| request_id | Request ID for the namespace that is done |
| session | Session that received the notification. |
|
virtualinherited |
Callback notification for announce received by subscribe namespace.
Client mode only. Called when a PUBLISH_NAMESPACE is received for a subscribed prefix.
| track_namespace | Track namespace |
| session | Session that received the request. |
| publish_namespace_attributes | Publish announce attributes received |
|
virtualinherited |
Callback notification for new publish received.
Return the publish response to accept. Defaults to rejecting with kNotSupported.
| request_id | Incoming publish request ID |
| session | Session that received the request. |
| publish_attributes | Attributes of the publish |
| sub_ns_handler | Matching subscribe namespace handler, if any |
|
virtualinherited |
Callback on receipt of the peer's SETUP message.
Returning an error disconnects the session.
| session | The session receiving SETUP |
| setup_attributes | Peer setup attributes received |
|
virtualinherited |
Event to run on receiving a Standalone Fetch request.
Defaults to rejecting with kInternalError, since fetch is not served unless implemented.
| request_id | Request ID received. |
| session | Session that received the request. |
| track_full_name | Track full name |
| attributes | Fetch attributes received. |
|
virtualinherited |
Callback notification for status/state change.
Callback notification indicates state change of connection, such as disconnected. May be invoked in either client or server mode.
| session | The session whose status changed |
| status | Changed Status value |
|
virtual |
Callback notification for new subscribe namespace received.
Server mode only. Accept by returning the namespaces already published under the prefix, which the session sends with the OK. Defaults to accepting with none.
| prefix_namespace | Track namespace prefix |
| session | Session that received the request. |
| attributes | Attributes received |
|
virtual |
Callback notification for new subscribe received.
Server mode only. Defaults to accepting with an empty SubscribeResponse.
| request_id | Request ID received |
| session | Session that received the request. |
| track_full_name | Track full name |
| subscribe_attributes | Subscribe attributes received |
|
virtual |
Callback notification for new subscribe tracks received.
Server mode only. Accept by returning the namespaces already published under the prefix, which the session sends with the OK. Defaults to accepting with none.
| prefix_namespace | Track namespace prefix |
| session | Session that received the request. |
| attributes | Attributes received |
|
virtualinherited |
Callback notification for track status message received.
Defaults to accepting with an empty TrackStatusResponse.
| track_full_name | Track full name |
| session | Session that received the query. |
|
virtual |
Callback notification for unsubscribe namespace received.
Server mode only.
| prefix_namespace | Prefix namespace |
| session | Session that received the request. |
|
virtual |
Callback notification on unsubscribe received.
Server mode only.
| request_id | Request ID received |
| session | Session that received the request. |