Struct mio::net::UnixDatagram[][src]

pub struct UnixDatagram { /* fields omitted */ }
This is supported on crate feature net only.
Expand description

A Unix datagram socket.

Implementations

This is supported on Unix only.

Creates a Unix datagram socket bound to the given path.

This is supported on Unix only.

Creates a new UnixDatagram from a standard net::UnixDatagram.

This function is intended to be used to wrap a Unix datagram from the standard library in the Mio equivalent. The conversion assumes nothing about the underlying datagram; ; it is left up to the user to set it in non-blocking mode.

This is supported on Unix only.

Connects the socket to the specified address.

This is supported on Unix only.

Creates a Unix Datagram socket which is not bound to any address.

This is supported on Unix only.

Create an unnamed pair of connected sockets.

This is supported on Unix only.

Returns the address of this socket.

This is supported on Unix only.

Returns the address of this socket’s peer.

The connect method will connect the socket to a peer.

This is supported on Unix only.

Receives data from the socket.

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

This is supported on Unix only.

Receives data from the socket.

On success, returns the number of bytes read.

This is supported on Unix only.

Sends data on the socket to the specified address.

On success, returns the number of bytes written.

This is supported on Unix only.

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.

This is supported on Unix only.

Returns the value of the SO_ERROR option.

This is supported on Unix only.

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

Extracts the raw file descriptor. Read more

Formats the value using the given formatter. Read more

Converts a RawFd to a UnixDatagram.

Notes

The caller is responsible for ensuring that the socket is in non-blocking mode.

Consumes this object, returning the raw underlying file descriptor. Read more

Register self with the given Registry instance. Read more

Re-register self with the given Registry instance. Read more

Deregister self from the given Registry instance. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.