Struct wayland_commons::socket::Socket[][src]

pub struct Socket { /* fields omitted */ }

A wayland socket

Methods

impl Socket
[src]

Send a single message to the socket

A single socket message can contain several wayland messages

The fds slice should not be longer than MAX_FDS_OUT, and the bytes slice should not be longer than MAX_BYTES_OUT otherwise the receiving end may lose some data.

Receive a single message from the socket

Return the number of bytes received and the number of Fds received.

Errors with WouldBlock is no message is available.

A single socket message can contain several wayland messages.

The buffer slice should be at least MAX_BYTES_OUT long and the fds slice MAX_FDS_OUT long, otherwise some data of the received message may be lost.

Trait Implementations

impl FromRawFd for Socket
[src]

Constructs a new instance of Self from the given raw file descriptor. Read more

impl AsRawFd for Socket
[src]

Extracts the raw file descriptor. Read more

impl IntoRawFd for Socket
[src]

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

impl Drop for Socket
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl Send for Socket

impl Sync for Socket