[−][src]Struct tokio_seqpacket::UnixSeqpacketListener
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]
address: P,
backlog: c_int
) -> Result<Self>
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]
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<UnixSeqpacket>>
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
Auto Trait Implementations
impl !RefUnwindSafe for UnixSeqpacketListener
[src]
impl Send for UnixSeqpacketListener
[src]
impl Sync for UnixSeqpacketListener
[src]
impl Unpin for UnixSeqpacketListener
[src]
impl !UnwindSafe for UnixSeqpacketListener
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,