pub struct Server { /* private fields */ }Expand description
Implementations§
Source§impl Server
impl Server
Sourcepub async fn bind(
addr: SocketAddr,
latency: impl Into<Option<Duration>>,
) -> Result<Self>
pub async fn bind( addr: SocketAddr, latency: impl Into<Option<Duration>>, ) -> Result<Self>
Bind an SRT listener on addr (SRT has no well-known port; 9000 is common).
latency is the SRT receive latency, negotiated at handshake time; pass
None for a sensible default (500ms). It doubles as the egress skip
threshold for Subscribe requests.
Sourcepub async fn accept(&mut self) -> Option<Request>
pub async fn accept(&mut self) -> Option<Request>
Wait for the next connection that wants to publish or subscribe.
Connections whose stream id can’t be routed (no usable resource name) are
rejected internally and skipped, so every Request returned is
actionable. Returns None only if the listener stops accepting (it
currently never does).
Auto Trait Implementations§
impl !RefUnwindSafe for Server
impl !UnwindSafe for Server
impl Freeze for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnsafeUnpin for Server
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