Function lrs::syscall::recvfrom

Receives data on a socket.

Syntax

fn recvfrom(sockfd: i32, buf: &mut [u8], flags: i32, src_addr: Option<&mut [u8]>, addrlen: &mut usize) -> i64

Arguments

NameDescription
sockfd

The socket on which to receive.

buf

The buffer into which the received data is placed.

flags

Flags used while receiving.

src_addr

An optional place where the address of the sender is placed.

addrlen

A place where the length of the senders address is placed.

Return value

Returns the number of bytes received or an error value.

See also