Struct std::sys_common::net::TcpListener
source · pub struct TcpListener {
inner: Socket,
}
Fields§
§inner: Socket
Implementations§
source§impl TcpListener
impl TcpListener
pub fn bind(addr: Result<&SocketAddr>) -> Result<TcpListener>
pub fn socket(&self) -> &Socket
pub fn into_socket(self) -> Socket
pub fn socket_addr(&self) -> Result<SocketAddr>
pub fn accept(&self) -> Result<(TcpStream, SocketAddr)>
pub fn duplicate(&self) -> Result<TcpListener>
pub fn set_ttl(&self, ttl: u32) -> Result<()>
pub fn ttl(&self) -> Result<u32>
pub fn set_only_v6(&self, only_v6: bool) -> Result<()>
pub fn only_v6(&self) -> Result<bool>
pub fn take_error(&self) -> Result<Option<Error>>
pub fn set_nonblocking(&self, nonblocking: bool) -> Result<()>
Trait Implementations§
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§
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