pub struct AsyncRtmpServer { /* private fields */ }Available on crate feature
tokio only.Expand description
A tokio::net::TcpListener that accepts inbound RTMP publishers and hands
back a driven RtmpConnection per connection.
Implementations§
Source§impl AsyncRtmpServer
impl AsyncRtmpServer
Sourcepub async fn bind<A: ToSocketAddrs>(
addr: A,
config: ServerConfig,
) -> Result<Self>
pub async fn bind<A: ToSocketAddrs>( addr: A, config: ServerConfig, ) -> Result<Self>
Binds a listen address (e.g. "0.0.0.0:1935", the IANA-assigned RTMP
port). config is cloned into a fresh ServerSession for each
accepted connection.
Sourcepub async fn accept(&self) -> Result<RtmpConnection>
pub async fn accept(&self) -> Result<RtmpConnection>
Accepts the next inbound connection and wraps it with a fresh
ServerSession built from this server’s ServerConfig.
Sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
The address this server is actually bound to (useful for ":0"
ephemeral-port binds).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AsyncRtmpServer
impl RefUnwindSafe for AsyncRtmpServer
impl Send for AsyncRtmpServer
impl Sync for AsyncRtmpServer
impl Unpin for AsyncRtmpServer
impl UnsafeUnpin for AsyncRtmpServer
impl UnwindSafe for AsyncRtmpServer
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