pub struct RtmpListener { /* private fields */ }
Expand description
The default RTMP listener.
Implementations§
Source§impl RtmpListener
impl RtmpListener
Sourcepub async fn bind<A: ToSocketAddrs>(addr: A) -> IOResult<Self>
pub async fn bind<A: ToSocketAddrs>(addr: A) -> IOResult<Self>
Opens a RTMP socket for remote host. When binding succeeded, this wraps tokio’s TcpListener into RtmpListener. Read more
Sourcepub async fn accept(&self) -> IOResult<(RtmpStream, SocketAddr)>
pub async fn accept(&self) -> IOResult<(RtmpStream, SocketAddr)>
Accepts a new incoming connection from this listener. When acceptance succeeded, this wraps tokio’s TcpListener into RtmpListener. Read more
Sourcepub fn poll_accept(
&self,
cx: &mut Context<'_>,
) -> Poll<IOResult<(RtmpStream, SocketAddr)>>
pub fn poll_accept( &self, cx: &mut Context<'_>, ) -> Poll<IOResult<(RtmpStream, SocketAddr)>>
Polls to accept a new incoming connection to this listener. Read more
Sourcepub fn from_std(std_listener: StdListener) -> IOResult<Self>
pub fn from_std(std_listener: StdListener) -> IOResult<Self>
Creates new RtmpListener from a std::net::TcpListener
.
When binding succeeded, this wraps tokio’s TcpListener into RtmpListener.
Read more
Sourcepub fn into_std(self) -> IOResult<StdListener>
pub fn into_std(self) -> IOResult<StdListener>
Turns a sheave_core::net::rtmp::RtmpListener into
std::net::TcpListener`.
Read more
Sourcepub fn local_addr(&self) -> IOResult<SocketAddr>
pub fn local_addr(&self) -> IOResult<SocketAddr>
Returns the local address that this listener is bound to. Read more
Trait Implementations§
Source§impl AsFd for RtmpListener
impl AsFd for RtmpListener
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Source§impl AsRawFd for RtmpListener
impl AsRawFd for RtmpListener
Source§impl Debug for RtmpListener
impl Debug for RtmpListener
Source§impl TryFrom<TcpListener> for RtmpListener
impl TryFrom<TcpListener> for RtmpListener
Auto Trait Implementations§
impl !Freeze for RtmpListener
impl RefUnwindSafe for RtmpListener
impl Send for RtmpListener
impl Sync for RtmpListener
impl Unpin for RtmpListener
impl UnwindSafe for RtmpListener
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more