[][src]Struct tokio_seqpacket::UnixSeqpacketListener

pub struct UnixSeqpacketListener { /* fields omitted */ }

Listener for Unix seqpacket sockets.

Implementations

impl UnixSeqpacketListener[src]

pub fn bind<P: AsRef<Path>>(address: P) -> Result<Self>[src]

Bind a new seqpacket listener to the given address.

The create listener will be ready to accept new connections.

pub fn bind_with_backlog<P: AsRef<Path>>(
    address: P,
    backlog: c_int
) -> Result<Self>
[src]

Bind a new seqpacket listener to the given address.

The create listener will be ready to accept new connections.

The backlog parameter is used to determine the size of connection queue. See man 3 listen for more information.

pub fn local_addr(&self) -> Result<PathBuf>[src]

Get the socket address of the local half of this connection.

pub fn take_error(&self) -> Result<Option<Error>>[src]

Get the value of the SO_ERROR option.

pub fn poll_accept(
    &mut self,
    cx: &mut Context<'_>
) -> Poll<Result<UnixSeqpacket>>
[src]

Check if there is a connection ready to accept.

Note that unlike Self::accept, only the last task calling this function will be woken up. For that reason, it is preferable to use the async functions rather than polling functions when possible.

Note that this function does not return a remote address for the accepted connection. This is because connected Unix sockets are anonymous and have no meaningful address.

pub async fn accept(&mut self) -> Result<UnixSeqpacket>[src]

Accept a new incoming connection on the listener.

This function is safe to call concurrently from different tasks. Although no order is guaranteed, all calling tasks will try to complete the asynchronous action.

Note that this function does not return a remote address for the accepted connection. This is because connected Unix sockets are anonymous and have no meaningful address.

Trait Implementations

impl Debug for UnixSeqpacketListener[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.