Method lrs::socket::Socket::send_to

Sends a message on a connection-less socket.

Syntax

impl Socket {
    fn send_to<A>(&self, buf: &[u8], addr: A, flags: MsgFlags) -> Result<usize, Errno>
        where A: AsRef<[u8]>,
}

Arguments

NameDescription
buf

The buffer containing the message.

addr

The destination of the message.

flags

Flags that can change the behavior of the operation.

Return value

Returns the number of bytes sent.

See also