pub struct WhipEndpoint { /* private fields */ }Available on crate features
ingest and webrtc only.Expand description
A WHIP/WHEP signaling endpoint the host drives from its HTTP layer.
POST of an SDP offer → accept_offer returns the SDP
answer to write back with 201 Created. The returned WhipResource is the
handle the host stores (keyed by the Location URL) and later
closes on DELETE.
Implementations§
Source§impl WhipEndpoint
impl WhipEndpoint
Sourcepub fn new(ctx: IngestContext) -> Self
pub fn new(ctx: IngestContext) -> Self
Build an endpoint that publishes ingested media through ctx.
Sourcepub fn accept_offer(
&self,
offer_sdp: &str,
key: StreamKey,
transport: Arc<dyn DtlsSrtpTransport>,
) -> Result<(WhipResource, String)>
pub fn accept_offer( &self, offer_sdp: &str, key: StreamKey, transport: Arc<dyn DtlsSrtpTransport>, ) -> Result<(WhipResource, String)>
Handle a WHIP POST: validate the offer, mint the answer from the
transport’s credentials, and return the resource handle plus the answer
SDP. The host then runs WhipResource::pump (typically tokio::spawn)
to move media for the connection’s lifetime.
Trait Implementations§
Source§impl Clone for WhipEndpoint
impl Clone for WhipEndpoint
Source§fn clone(&self) -> WhipEndpoint
fn clone(&self) -> WhipEndpoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for WhipEndpoint
impl !UnwindSafe for WhipEndpoint
impl Freeze for WhipEndpoint
impl Send for WhipEndpoint
impl Sync for WhipEndpoint
impl Unpin for WhipEndpoint
impl UnsafeUnpin for WhipEndpoint
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