sendfd

Trait SendWithFd

Source
pub trait SendWithFd {
    // Required method
    fn send_with_fd(&self, bytes: &[u8], fds: &[RawFd]) -> Result<usize>;
}
Expand description

An extension trait that enables sending associated file descriptors along with the data.

Required Methods§

Source

fn send_with_fd(&self, bytes: &[u8], fds: &[RawFd]) -> Result<usize>

Send the bytes and the file descriptors.

Implementations on Foreign Types§

Source§

impl SendWithFd for UnixDatagram

Source§

fn send_with_fd(&self, bytes: &[u8], fds: &[RawFd]) -> Result<usize>

Send the bytes and the file descriptors as a single packet.

It is guaranteed that the bytes and the associated file descriptors will arrive at the same time, however the receiver end may not receive the full message if its buffers are too small.

Source§

impl SendWithFd for WriteHalf<'_>

Source§

fn send_with_fd(&self, bytes: &[u8], fds: &[RawFd]) -> Result<usize>

Send the bytes and the file descriptors as a stream.

Neither is guaranteed to be received by the other end in a single chunk and may arrive entirely independently.

Source§

impl SendWithFd for UnixStream

Source§

fn send_with_fd(&self, bytes: &[u8], fds: &[RawFd]) -> Result<usize>

Send the bytes and the file descriptors as a stream.

Neither is guaranteed to be received by the other end in a single chunk and may arrive entirely independently.

Source§

impl SendWithFd for UnixDatagram

Source§

fn send_with_fd(&self, bytes: &[u8], fds: &[RawFd]) -> Result<usize>

Send the bytes and the file descriptors as a single packet.

It is guaranteed that the bytes and the associated file descriptors will arrive at the same time, however the receiver end may not receive the full message if its buffers are too small.

Source§

impl SendWithFd for UnixStream

Source§

fn send_with_fd(&self, bytes: &[u8], fds: &[RawFd]) -> Result<usize>

Send the bytes and the file descriptors as a stream.

Neither is guaranteed to be received by the other end in a single chunk and may arrive entirely independently.

Implementors§