DDraceNetwork Docs
Network-UDP
Collaboration diagram for Network-UDP:

Functions

int net_udp_send (NETSOCKET sock, const NETADDR *addr, const void *data, int size)
 
int net_udp_close (NETSOCKET sock)
 

Detailed Description

Function Documentation

◆ net_udp_close()

int net_udp_close ( NETSOCKET  sock)

Closes an UDP socket.

Parameters
sockSocket to close.
Returns
0 on success. -1 on error.

◆ net_udp_send()

int net_udp_send ( NETSOCKET  sock,
const NETADDR addr,
const void *  data,
int  size 
)

Sends a packet over an UDP socket.

Parameters
sockSocket to use.
addrWhere to send the packet.
dataPointer to the packet data to send.
sizeSize of the packet.
Returns
On success it returns the number of bytes sent. Returns -1 on error.