pub struct TcpListener {
inner: TcpListener,
}
Fields
inner: TcpListener
Implementations
sourceimpl TcpListener
impl TcpListener
pub fn new(inner: TcpListener) -> Result<TcpListener>
pub fn local_addr(&self) -> Result<SocketAddr>
pub fn try_clone(&self) -> Result<TcpListener>
pub fn accept(&self) -> Result<(TcpStream, SocketAddr)>
pub fn set_only_v6(&self, only_v6: bool) -> Result<()>
pub fn only_v6(&self) -> Result<bool>
pub fn set_ttl(&self, ttl: u32) -> Result<()>
pub fn ttl(&self) -> Result<u32>
pub fn take_error(&self) -> Result<Option<Error>>
Trait Implementations
sourceimpl AsRawFd for TcpListener
impl AsRawFd for TcpListener
sourceimpl Debug for TcpListener
impl Debug for TcpListener
sourceimpl Evented for TcpListener
impl Evented for TcpListener
sourcefn register(
&self,
poll: &Poll,
token: Token,
interest: Ready,
opts: PollOpt
) -> Result<()>
fn register(
&self,
poll: &Poll,
token: Token,
interest: Ready,
opts: PollOpt
) -> Result<()>
Register self
with the given Poll
instance. Read more
sourceimpl FromRawFd for TcpListener
impl FromRawFd for TcpListener
sourceunsafe fn from_raw_fd(fd: RawFd) -> TcpListener
unsafe fn from_raw_fd(fd: RawFd) -> TcpListener
Constructs a new instance of Self
from the given raw file
descriptor. Read more
sourceimpl IntoRawFd for TcpListener
impl IntoRawFd for TcpListener
sourcefn into_raw_fd(self) -> RawFd
fn into_raw_fd(self) -> RawFd
Consumes this object, returning the raw underlying file descriptor. Read more
Auto Trait Implementations
impl RefUnwindSafe for TcpListener
impl Send for TcpListener
impl Sync for TcpListener
impl Unpin for TcpListener
impl UnwindSafe for TcpListener
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more