* @ingroup netconn_udp * Send data (in form of a netbuf) to a specific remote IP address and port. * Only to be used for UDP and RAW netconns (not TCP). * * @param conn the netconn over which to send data * @param buf a netbuf containing the data to send * @param addr the remote IP address to which to send the data * @param port the remote port to which to send the data * @return ERR_OK if
| 919 | * @return ERR_OK if data was sent, any other err_t on error |
| 920 | */ |
| 921 | err_t |
| 922 | netconn_sendto(struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, u16_t port) |
| 923 | { |
| 924 | if (buf != NULL) { |
| 925 | ip_addr_set(&buf->addr, addr); |
| 926 | buf->port = port; |
| 927 | return netconn_send(conn, buf); |
| 928 | } |
| 929 | return ERR_VAL; |
| 930 | } |
| 931 | |
| 932 | /** |
| 933 | * @ingroup netconn_udp |
no test coverage detected