/// Writes the the contents of `UserBufferIterator` into this socket as
/// single message.
///
/// # Parameters
/// - `task`: The task to read memory from.
/// - `user_buffers`: The `UserBufferIterator` to read the data from.
///
/// Returns the number of bytes that were written to the socket.
Writes the the contents of `UserBufferIterator` into this socket as
single message.
Writes the the contents of ` UserBufferIterator ` into this socket as single message .
pub fn write_datagram(
        &mut self,
        task: &Task,
        user_buffers: &mut UserBufferIterator<'_>,
        address: Option<SocketAddress>,
        ancillary_data: &mut Option<AncillaryData>,
    ) -> Result<usize, Errno> {
        if self.closed {
            return error!(EPIPE);
        }
        let actual = user_buffers.remaining();
        if actual > self.capacity() {
            return error!(EMSGSIZE);
        }
        if actual > self.available_capacity() {
            return error!(EAGAIN);
        }
        let data = MessageData::new_from_user(task, user_buffers, actual)?;
        self.write_message(Message::new(data, address, ancillary_data.take()));
        Ok(actual)
    }
pub fn write_datagram ( & mut self , task : & Task , user_buffers : & mut UserBufferIterator < ' _ > , address : Option < SocketAddress > , ancillary_data : & mut Option < AncillaryData > , ) -> Result < usize , Errno > { if self . closed { return error ! ( EPIPE ) ; } let actual = user_buffers . remaining ( ) ; if actual > self . capacity ( ) { return error ! ( EMSGSIZE ) ; } if actual > self . available_capacity ( ) { return error ! ( EAGAIN ) ; } let data = MessageData :: new_from_user ( task , user_buffers , actual ) ? ; self . write_message ( Message :: new ( data , address , ancillary_data . take ( ) ) ) ; Ok ( actual ) }
Writes the the contents of `UserBufferIterator` into this socket as
single message.
Writes the the contents of ` UserBufferIterator ` into this socket as single message .
&mut self
task
&Task
The task to read memory from.
The task to read memory from .
user_buffers
&mut UserBufferIterator<'_>
The `UserBufferIterator` to read the data from.

Returns the number of bytes that were written to the socket.
The ` UserBufferIterator ` to read the data from . Returns the number of bytes that were written to the socket .
address
Option<SocketAddress>
ancillary_data
&mut Option<AncillaryData>