Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Copy up to a specified number of bytes received from a remote socket into an application memory buffer. See function NetSock_RxData() for more information.

Files

net_bsd.h/net_bsd.c

Prototypes

Code Block

ssize_t  recv (int      sock_id,
               void    *p_data_buf,
              _size_t   data_buf_len,
               int      flags);

 
ssize_t  recvfrom (         int         sock_id,
                            void       *p_data_buf,
                           _size_t      data_buf_len,
                            int         flags,
                   struct   sockaddr   *p_addr_remote,
                            socklen_t  *p_addr_len);

Arguments

sock_id

Socket descriptor/handle identifier of socket to receive data.

...

    1. Pass the size of the address buffer pointed to by `p_addr_remote`.
    2. Return the actual size of socket address structure with the received data's remote address, if no error(s). Otherwise, return 0.

Returned Value

Number of positive data octets received, if no error(s).

...