pub struct SessionServer { /* private fields */ }Expand description
Manages all streaming client sessions.
Implementations§
Source§impl SessionServer
impl SessionServer
Sourcepub fn new(
port: u16,
buffer_ms: i32,
auth: Option<Arc<dyn AuthValidator>>,
) -> Self
pub fn new( port: u16, buffer_ms: i32, auth: Option<Arc<dyn AuthValidator>>, ) -> Self
Create a new session server.
Sourcepub async fn push_settings(&self, update: ClientSettingsUpdate)
pub async fn push_settings(&self, update: ClientSettingsUpdate)
Push a settings update to a specific streaming client.
Sourcepub async fn run(
&self,
chunk_rx: Sender<WireChunkData>,
codec: String,
codec_header: Vec<u8>,
event_tx: Sender<ServerEvent>,
) -> Result<()>
pub async fn run( &self, chunk_rx: Sender<WireChunkData>, codec: String, codec_header: Vec<u8>, event_tx: Sender<ServerEvent>, ) -> Result<()>
Run the session server — accepts connections and spawns per-client tasks.
Sourcepub async fn connected_clients(&self) -> Vec<ClientInfo>
pub async fn connected_clients(&self) -> Vec<ClientInfo>
Get list of connected clients.
Auto Trait Implementations§
impl Freeze for SessionServer
impl !RefUnwindSafe for SessionServer
impl Send for SessionServer
impl Sync for SessionServer
impl Unpin for SessionServer
impl UnsafeUnpin for SessionServer
impl !UnwindSafe for SessionServer
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