MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / recv

Function recv

components/net/sal/socket/net_sockets.c:403–408  ·  view source on GitHub ↗

* @brief Receives data from a connected socket. * * This function reads data from a connected socket and stores it in the specified buffer. * It is typically used with connection-oriented protocols (e.g., TCP). * * @param s The file descriptor of the connected socket to receive data from. * @param mem A pointer to the buffer where the received data will be stored. * @param len Th

Source from the content-addressed store, hash-verified

401 * @see send() Sends data on a connected socket.
402 */
403int recv(int s, void *mem, size_t len, int flags)
404{
405 int socket = dfs_net_getsocket(s);
406
407 return sal_recvfrom(socket, mem, len, flags, NULL, NULL);
408}
409RTM_EXPORT(recv);
410
411/**

Callers 4

tcpclientFunction · 0.50
tcpclientFunction · 0.50
tcpservFunction · 0.50
tcpecho_socket_entryFunction · 0.50

Calls 2

dfs_net_getsocketFunction · 0.85
sal_recvfromFunction · 0.85

Tested by 1

tcpecho_socket_entryFunction · 0.40