[][src]Struct tokio::net::unix::UnixDatagram

pub struct UnixDatagram { /* fields omitted */ }

An I/O object representing a Unix datagram socket.

Methods

impl UnixDatagram
[src]

Creates a new UnixDatagram bound to the specified path.

Creates an unnamed pair of connected sockets.

This function will create a pair of interconnected Unix sockets for communicating back and forth between one another. Each socket will be associated with the event loop whose handle is also provided.

Consumes a UnixDatagram in the standard library and returns a nonblocking UnixDatagram from this crate.

The returned datagram will be associated with the given event loop specified by handle and is ready to perform I/O.

Creates a new UnixDatagram which is not bound to any address.

Connects the socket to the specified address.

The send method may be used to send data to the specified address. recv and recv_from will only receive data from that address.

Test whether this socket is ready to be read or not.

Test whether this socket is ready to be written to or not.

Returns the local address that this socket is bound to.

Returns the address of this socket's peer.

The connect method will connect the socket to a peer.

Receives data from the socket.

On success, returns the number of bytes read and the address from whence the data came.

Receives data from the socket.

On success, returns the number of bytes read.

Returns a future for receiving a datagram. See the documentation on RecvDgram for details.

Sends data on the socket to the specified address.

On success, returns the number of bytes written.

Sends data on the socket to the socket's peer.

The peer address may be set by the connect method, and this method will return an error if the socket has not already been connected.

On success, returns the number of bytes written.

Returns a future sending the data in buf to the socket at path.

Returns the value of the SO_ERROR option.

Shut down the read, write, or both halves of this connection.

This function will cause all pending and future I/O calls on the specified portions to immediately return with an appropriate value (see the documentation of Shutdown).

Trait Implementations

impl Debug for UnixDatagram
[src]

Formats the value using the given formatter. Read more

impl AsRawFd for UnixDatagram
[src]

Extracts the raw file descriptor. Read more

Auto Trait Implementations

impl Send for UnixDatagram

impl Sync for UnixDatagram

Blanket Implementations

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

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Important traits for &'a mut W

Immutably borrows from an owned value. Read more

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

Important traits for &'a mut W

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> Erased for T
[src]