|
LibQuicR
|
MOQ Implementation supporting both client and server modes. More...
#include <transport.h>
Classes | |
| struct | ConnectionRemoteInfo |
| Connection remote information. More... | |
Public Types | |
| enum class | Status : uint8_t { kReady = 0 , kNotReady , kInternalError , kInvalidParams , kConnecting , kDisconnecting , kNotConnected , kFailedToConnect , kPendingServerSetup } |
| Status of the transport. More... | |
| enum class | ControlMessageStatus : uint8_t { kMessageIncomplete , kMessageComplete , kStreamBufferCannotBeZero , kStreamBufferMissingType , kUnsupportedMessageType } |
| Control message status codes. More... | |
| enum class | StreamDataMessageStatus : uint8_t |
| enum class | ConnectionStatus : uint8_t { kNotConnected = 0 , kConnecting , kConnected , kIdleTimeout , kClosedByRemote } |
| Connection status codes. More... | |
Public Member Functions | |
| Transport ()=delete | |
| Transport (const ClientConfig &cfg, std::shared_ptr< TickService > tick_service) | |
| Client mode Constructor to create the MOQ instance. | |
| Transport (const ServerConfig &cfg, std::shared_ptr< TickService > tick_service) | |
| Server mode Constructor to create the MOQ instance. | |
| ~Transport () | |
| const std::shared_ptr< TickService > & | GetTickService () const noexcept |
| void | SubscribeTrack (ConnectionHandle connection_handle, std::shared_ptr< SubscribeTrackHandler > track_handler) |
| Subscribe to a track. | |
| void | UnsubscribeTrack (ConnectionHandle connection_handle, const std::shared_ptr< SubscribeTrackHandler > &track_handler) |
| Unsubscribe track. | |
| void | UpdateTrackSubscription (ConnectionHandle connection_handle, std::shared_ptr< SubscribeTrackHandler > track_handler, bool new_group_request=false) |
| Update Subscription to a track. | |
| void | PublishTrack (ConnectionHandle connection_handle, std::shared_ptr< PublishTrackHandler > track_handler) |
| Publish to a track. | |
| void | PublishTrackSub (ConnectionHandle connection_handle, std::shared_ptr< PublishTrackHandler > track_handler) |
| Publish to a track and force subscribe. | |
| void | UnpublishTrack (ConnectionHandle connection_handle, const std::shared_ptr< PublishTrackHandler > &track_handler) |
| Unpublish track. | |
| virtual bool | FetchReceived (ConnectionHandle connection_handle, uint64_t request_id, const FullTrackName &track_full_name, const quicr::messages::FetchAttributes &attributes) |
| Event to run on receiving Fetch request. | |
| void | FetchTrack (ConnectionHandle connection_handle, std::shared_ptr< FetchTrackHandler > track_handler) |
| Fetch track. | |
| void | CancelFetchTrack (ConnectionHandle connection_handle, std::shared_ptr< FetchTrackHandler > track_handler) |
| Cancel Fetch track. | |
| uint64_t | RequestTrackStatus (ConnectionHandle connection_handle, const FullTrackName &track_full_name, const messages::SubscribeAttributes &subscribe_attributes) |
| Request track status. | |
| virtual void | ResolveTrackStatus (ConnectionHandle connection_handle, uint64_t request_id, uint64_t track_alias, const SubscribeResponse &subscribe_response) |
| Accept or reject track status that was received. | |
| Status | GetStatus () const noexcept |
| Get the status of the Client. | |
Base Calbacks | |
Both client and server implement the same transport base callbacks | |
| virtual void | StatusChanged (Status status) |
| Callback notification for status/state change. | |
| virtual void | TrackStatusReceived (ConnectionHandle connection_handle, uint64_t request_id, const FullTrackName &track_full_name, const messages::SubscribeAttributes &subscribe_attributes) |
| Callback notification for track status message received. | |
| virtual void | TrackStatusResponseReceived (ConnectionHandle connection_handle, uint64_t request_id, const SubscribeResponse &response) |
| Callback notification for track status OK received. | |
Protected Member Functions | |
| std::shared_ptr< Transport > | GetSharedPtr () |
| ConnectionContext & | GetConnectionContext (ConnectionHandle conn) |
MOQ Implementation supporting both client and server modes.
MoQ implementation is the handler for either a client or server. It can run in only one mode, client or server.
|
strong |
|
strong |
Control message status codes.
|
strong |
Status of the transport.
| Enumerator | |
|---|---|
| kReady | |
| kNotReady | |
| kInternalError | |
| kInvalidParams | |
| kConnecting | |
| kDisconnecting | |
| kNotConnected | |
| kFailedToConnect | |
| kPendingServerSetup | |
|
strong |
|
delete |
| quicr::Transport::Transport | ( | const ClientConfig & | cfg, |
| std::shared_ptr< TickService > | tick_service ) |
| quicr::Transport::Transport | ( | const ServerConfig & | cfg, |
| std::shared_ptr< TickService > | tick_service ) |
| quicr::Transport::~Transport | ( | ) |
| void quicr::Transport::CancelFetchTrack | ( | ConnectionHandle | connection_handle, |
| std::shared_ptr< FetchTrackHandler > | track_handler ) |
Cancel Fetch track.
| connection_handle | Connection ID to send fetch cancel. |
| track_handler | Fetch Track handler to cancel. |
|
virtual |
Event to run on receiving Fetch request.
| connection_handle | Source connection ID. |
| request_id | Request ID received. |
| track_full_name | Track full name |
| attributes | Fetch attributes received. |
Reimplemented in quicr::Client, and quicr::Server.
| void quicr::Transport::FetchTrack | ( | ConnectionHandle | connection_handle, |
| std::shared_ptr< FetchTrackHandler > | track_handler ) |
Fetch track.
| connection_handle | Connection ID to send fetch |
| track_handler | Track handler used for fetching |
|
protected |
|
protected |
|
inlinenoexcept |
|
inlinenoexcept |
| void quicr::Transport::PublishTrack | ( | ConnectionHandle | connection_handle, |
| std::shared_ptr< PublishTrackHandler > | track_handler ) |
Publish to a track.
| connection_handle | Connection ID from transport for the QUIC connection context |
| track_handler | Track handler to use for track related functions and callbacks |
| void quicr::Transport::PublishTrackSub | ( | ConnectionHandle | connection_handle, |
| std::shared_ptr< PublishTrackHandler > | track_handler ) |
Publish to a track and force subscribe.
| connection_handle | Connection ID from transport for the QUIC connection context |
| track_handler | Track handler to use for track related functions and callbacks |
| uint64_t quicr::Transport::RequestTrackStatus | ( | ConnectionHandle | connection_handle, |
| const FullTrackName & | track_full_name, | ||
| const messages::SubscribeAttributes & | subscribe_attributes ) |
Request track status.
| connection_handle | Source connection ID. |
| track_full_name | Track full name |
| subscribe_attributes | Subscribe attributes for track status |
|
virtual |
Accept or reject track status that was received.
Accept or reject track status received via TrackStatusReceived(). The MoQ Transport will send the protocol message based on the SubscribeResponse. Per MOQT draft-14, track status request, ok, and error are the same as subscribe
| connection_handle | source connection ID |
| request_id | Request ID that was provided by TrackStatusReceived |
| track_alias | Track alias for the track |
| subscribe_response | Response to the track status request, either Ok or Error. Largest loation should be set if kOk and there is content |
|
inlinevirtual |
Callback notification for status/state change.
Callback notification indicates state change of connection, such as disconnected
| status | Changed Status value |
| void quicr::Transport::SubscribeTrack | ( | ConnectionHandle | connection_handle, |
| std::shared_ptr< SubscribeTrackHandler > | track_handler ) |
Subscribe to a track.
| connection_handle | Connection ID to send subscribe |
| track_handler | Track handler to use for track related functions and callbacks |
|
virtual |
Callback notification for track status message received.
| connection_handle | Source connection ID |
| request_id | Request ID received |
| track_full_name | Track full name |
| subscribe_attributes | Subscribe attributes received |
|
virtual |
Callback notification for track status OK received.
| connection_handle | Source connection ID |
| request_id | Request ID received |
| response | Track status (track_status = Subscribe) response |
| void quicr::Transport::UnpublishTrack | ( | ConnectionHandle | connection_handle, |
| const std::shared_ptr< PublishTrackHandler > & | track_handler ) |
Unpublish track.
| connection_handle | Connection ID from transport for the QUIC connection context |
| track_handler | Track handler used when published track |
| void quicr::Transport::UnsubscribeTrack | ( | ConnectionHandle | connection_handle, |
| const std::shared_ptr< SubscribeTrackHandler > & | track_handler ) |
Unsubscribe track.
| connection_handle | Connection ID to send subscribe |
| track_handler | Track handler to use for track related functions and callbacks |
| void quicr::Transport::UpdateTrackSubscription | ( | ConnectionHandle | connection_handle, |
| std::shared_ptr< SubscribeTrackHandler > | track_handler, | ||
| bool | new_group_request = false ) |
Update Subscription to a track.
| connection_handle | Connection ID to send subscribe |
| track_handler | Track handler to use for track related functions and callbacks |
| new_group_request | True to add new group request parameter |