pub struct ServerSession<S, H> { /* private fields */ }
Expand description
A RTMP server session that is used to communicate with a client.
This provides a high-level API to drive a RTMP session.
Implementations§
Source§impl<S, H> ServerSession<S, H>
impl<S, H> ServerSession<S, H>
Sourcepub fn with_context(self, ctx: Context) -> Self
pub fn with_context(self, ctx: Context) -> Self
Set the context of the session.
Source§impl<S: AsyncRead + AsyncWrite + Unpin, H: SessionHandler> ServerSession<S, H>
impl<S: AsyncRead + AsyncWrite + Unpin, H: SessionHandler> ServerSession<S, H>
Sourcepub async fn run(self) -> Result<bool, RtmpError>
pub async fn run(self) -> Result<bool, RtmpError>
Run the session to completion The result of the return value will be true if all publishers have disconnected If any publishers are still connected, the result will be false This can be used to detect non-graceful disconnects (ie. the client crashed)
Auto Trait Implementations§
impl<S, H> !Freeze for ServerSession<S, H>
impl<S, H> RefUnwindSafe for ServerSession<S, H>where
S: RefUnwindSafe,
H: RefUnwindSafe,
impl<S, H> Send for ServerSession<S, H>
impl<S, H> Sync for ServerSession<S, H>
impl<S, H> Unpin for ServerSession<S, H>
impl<S, H> UnwindSafe for ServerSession<S, H>where
S: UnwindSafe,
H: UnwindSafe,
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