pub struct Client {
pub quic: Endpoint,
pub tls: ClientConfig,
pub transport: Arc<TransportConfig>,
pub websocket_delay: Option<Duration>,
}Expand description
Client for establishing MoQ connections over QUIC, WebTransport, or WebSocket.
Create via ClientConfig::init or Client::new.
Fields§
§quic: Endpoint§tls: ClientConfig§transport: Arc<TransportConfig>§websocket_delay: Option<Duration>Implementations§
Source§impl Client
impl Client
pub fn new(config: ClientConfig) -> Result<Self>
Sourcepub async fn connect(
&self,
url: Url,
publish: impl Into<Option<OriginConsumer>>,
subscribe: impl Into<Option<OriginProducer>>,
) -> Result<Session>
pub async fn connect( &self, url: Url, publish: impl Into<Option<OriginConsumer>>, subscribe: impl Into<Option<OriginProducer>>, ) -> Result<Session>
Establish a WebTransport/QUIC connection followed by a MoQ handshake.
Sourcepub async fn connect_with_fallback(
&self,
url: Url,
publish: impl Into<Option<OriginConsumer>>,
subscribe: impl Into<Option<OriginProducer>>,
) -> Result<Session>
pub async fn connect_with_fallback( &self, url: Url, publish: impl Into<Option<OriginConsumer>>, subscribe: impl Into<Option<OriginProducer>>, ) -> Result<Session>
Establish a WebTransport/QUIC connection or a WebSocket connection, whichever is available first.
Establishes a MoQ handshake on the winning transport.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more