fn write(
        &mut self,
        task: &Task,
        user_buffers: &mut UserBufferIterator<'_>,
        address: Option<SocketAddress>,
        ancillary_data: &mut Option<AncillaryData>,
        socket_type: SocketType,
    ) -> Result<usize, Errno> {
        let bytes_written = if socket_type == SocketType::Stream {
            self.messages.write_stream(task, user_buffers, address, ancillary_data)?
        } else {
            self.messages.write_datagram(task, user_buffers, address, ancillary_data)?
        };
        if bytes_written > 0 {
            self.waiters.notify_events(FdEvents::POLLIN);
        }
        Ok(bytes_written)
    }
/// Writes the the contents of `UserBufferIterator` into this socket.
///
/// # Parameters
/// - `task`: The task to read memory from.
/// - `user_buffers`: The `UserBufferIterator` to read the data from.
/// - `ancillary_data`: Any ancillary data to write to the socket. Note that the ancillary data
///                     will only be written if the entirety of the requested write completes.
///
/// Returns the number of bytes that were written to the socket.
Writes the the contents of `UserBufferIterator` into this socket.
Writes the the contents of ` UserBufferIterator ` into this socket .
fn write(
        &mut self,
        task: &Task,
        user_buffers: &mut UserBufferIterator<'_>,
        address: Option<SocketAddress>,
        ancillary_data: &mut Option<AncillaryData>,
        socket_type: SocketType,
    ) -> Result<usize, Errno> {
        let bytes_written = if socket_type == SocketType::Stream {
            self.messages.write_stream(task, user_buffers, address, ancillary_data)?
        } else {
            self.messages.write_datagram(task, user_buffers, address, ancillary_data)?
        };
        if bytes_written > 0 {
            self.waiters.notify_events(FdEvents::POLLIN);
        }
        Ok(bytes_written)
    }
fn write ( & mut self , task : & Task , user_buffers : & mut UserBufferIterator < ' _ > , address : Option < SocketAddress > , ancillary_data : & mut Option < AncillaryData > , socket_type : SocketType , ) -> Result < usize , Errno > { let bytes_written = if socket_type == SocketType :: Stream { self . messages . write_stream ( task , user_buffers , address , ancillary_data ) ? } else { self . messages . write_datagram ( task , user_buffers , address , ancillary_data ) ? } ; if bytes_written > 0 { self . waiters . notify_events ( FdEvents :: POLLIN ) ; } Ok ( bytes_written ) }
Writes the the contents of `UserBufferIterator` into this socket.
Writes the the contents of ` UserBufferIterator ` into this socket .
&mut self
task
&Task
user_buffers
&mut UserBufferIterator<'_>
address
Option<SocketAddress>
ancillary_data
&mut Option<AncillaryData>
socket_type
SocketType
&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.
The ` UserBufferIterator ` to read the data from .
address
Option<SocketAddress>
ancillary_data
&mut Option<AncillaryData>
Any ancillary data to write to the socket. Note that the ancillary data
will only be written if the entirety of the requested write completes.

Returns the number of bytes that were written to the socket.
Any ancillary data to write to the socket . Note that the ancillary data will only be written if the entirety of the requested write completes . Returns the number of bytes that were written to the socket .
socket_type
SocketType