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 AsyncRtmpServerwhere
PollEvented<TcpListener>: RefUnwindSafe,
impl Send for AsyncRtmpServer
impl Sync for AsyncRtmpServer
impl Unpin for AsyncRtmpServer
impl UnsafeUnpin for AsyncRtmpServerwhere
I32NotAllOnes: UnsafeUnpin,
Align8<usize>: UnsafeUnpin,
*const ArcInner<Handle> is !null: UnsafeUnpin,
PhantomData<ArcInner<Handle>>: UnsafeUnpin,
*const ArcInner<ScheduledIo> is !null: UnsafeUnpin,
PhantomData<ArcInner<ScheduledIo>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(DamageKind, Disposition)>: UnsafeUnpin,
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