[−][src]Struct wayland_commons::socket::Socket
A wayland socket
Methods
impl Socket[src]
pub fn send_msg(&self, bytes: &[u8], fds: &[RawFd]) -> NixResult<()>[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.
pub fn rcv_msg(
&self,
buffer: &mut [u8],
fds: &mut [RawFd]
) -> NixResult<(usize, usize)>[src]
&self,
buffer: &mut [u8],
fds: &mut [RawFd]
) -> NixResult<(usize, usize)>
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 Drop for Socket[src]
impl AsRawFd for Socket[src]
impl IntoRawFd for Socket[src]
fn into_raw_fd(self) -> RawFd[src]
impl FromRawFd for Socket[src]
unsafe fn from_raw_fd(fd: RawFd) -> Socket[src]
Auto Trait Implementations
impl Unpin for Socket
impl Sync for Socket
impl Send for Socket
impl UnwindSafe for Socket
impl RefUnwindSafe for Socket
Blanket Implementations
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,