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: RtmpServerConfig,
) -> Result<Self>
pub async fn bind<A: ToSocketAddrs>( addr: A, config: RtmpServerConfig, ) -> Result<Self>
Binds a listen address (e.g. "0.0.0.0:1935", the IANA-assigned RTMP
port). The config’s session settings are cloned into a fresh
ServerSession for each accepted connection, and its Timeouts
bound every awaited I/O of that connection.
Sourcepub async fn accept(&self) -> Result<AcceptedRtmpConnection>
pub async fn accept(&self) -> Result<AcceptedRtmpConnection>
Accepts the next inbound connection and wraps it with a fresh
ServerSession built from this server’s RtmpServerConfig::session.
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 Forget for AsyncRtmpServer
impl Move 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