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

Function sendto

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

* @brief Sends data to a specific address using an unconnected socket. * * This function is typically used with connectionless protocols (e.g., UDP) to send data * to a specific destination address, as specified by 'to'. * * @param s The file descriptor of the socket to send data on. * @param dataptr A pointer to the buffer containing the data to be sent. * @param size The size,

Source from the content-addressed store, hash-verified

588 * @see send() Sends data on a connected socket.
589 */
590int sendto(int s, const void *dataptr, size_t size, int flags,
591 const struct sockaddr *to, socklen_t tolen)
592{
593 int socket = dfs_net_getsocket(s);
594
595 return sal_sendto(socket, dataptr, size, flags, to, tolen);
596}
597RTM_EXPORT(sendto);
598
599/**

Callers 7

sys_sendtoFunction · 0.85
sys_sendFunction · 0.85
clntudp_callFunction · 0.85
win_sendtoFunction · 0.85
udpclientFunction · 0.85
udpecho_socket_entryFunction · 0.85

Calls 2

dfs_net_getsocketFunction · 0.85
sal_sendtoFunction · 0.85

Tested by 1

udpecho_socket_entryFunction · 0.68