table of contents
socket_send6(3) | Library Functions Manual | socket_send6(3) |
NAME¶
socket_send6 - send a UDP datagramSYNTAX¶
#include <socket.h>const char ip[16], uint16 port, uint32 scope_id);
DESCRIPTION¶
socket_send6 sends len bytes starting at buf in a UDP datagram over the socket s to UDP port port on IP address ip.RETURN VALUE¶
socket_send6 returns 0 if the datagram was sent successfully. If not, it returns -1 and sets errno appropriately.EXAMPLE¶
#include <socket.h>
int s;
char ip[16];
uint16 p;
uint32 scope_id;
s = socket_tcp4();
socket_bind6(s,ip,p);
socket_send6(s,"hello, world",12,ip,p,scope_id);