* @brief Sends data on a connected socket. * * This function sends data to a connected socket, specified by the file descriptor 's'. * It is typically used with connection-oriented protocols (e.g., TCP). * * @param s The file descriptor of the socket to send data on. * The socket must be connected to a remote peer. * @param dataptr A pointer to the buffer containing
| 552 | * @see recv() Receives data from a connected socket. |
| 553 | */ |
| 554 | int send(int s, const void *dataptr, size_t size, int flags) |
| 555 | { |
| 556 | int socket = dfs_net_getsocket(s); |
| 557 | |
| 558 | return sal_sendto(socket, dataptr, size, flags, NULL, 0); |
| 559 | } |
| 560 | RTM_EXPORT(send); |
| 561 | |
| 562 | /** |