pub struct ServerSession { /* private fields */ }Expand description
A driveable RTSP server session (RFC 2326 §A.2).
Implementations§
Source§impl ServerSession
impl ServerSession
Sourcepub fn with_session_timeout(self, seconds: u64) -> Self
pub fn with_session_timeout(self, seconds: u64) -> Self
Sets the timeout (seconds) advertised in the Session header on SETUP.
Sourcepub fn with_session_seed(self, seed: u64) -> Self
pub fn with_session_seed(self, seed: u64) -> Self
Overrides the seed used to allocate session ids (deterministic for tests).
Sourcepub fn state(&self) -> SessionState
pub fn state(&self) -> SessionState
The current session state.
Sourcepub fn session_id(&self) -> Option<&str>
pub fn session_id(&self) -> Option<&str>
The allocated session id, once a SETUP has been handled.
Sourcepub fn negotiated_transport(&self) -> Option<&Transport>
pub fn negotiated_transport(&self) -> Option<&Transport>
The negotiated transport, once a SETUP has been handled.
Sourcepub fn handle_request(
&mut self,
data: &[u8],
) -> Result<(Vec<u8>, Vec<ServerEvent>)>
pub fn handle_request( &mut self, data: &[u8], ) -> Result<(Vec<u8>, Vec<ServerEvent>)>
Parses an inbound request and returns the serialized response bytes plus the events produced.
Trait Implementations§
Source§impl Debug for ServerSession
impl Debug for ServerSession
Auto Trait Implementations§
impl Freeze for ServerSession
impl RefUnwindSafe for ServerSession
impl Send for ServerSession
impl Sync for ServerSession
impl Unpin for ServerSession
impl UnsafeUnpin for ServerSession
impl UnwindSafe for ServerSession
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