Parameters & Returns
Parameters
Returns
Quick Summary
Creates a UDP socket for sending and receiving datagrams.
Takes a port (Int).
Returns a handle on success, or 0 on failure (Int).
Technical Exegesis...
Creates a UDP socket. If port is greater than 0, binds the socket to that port for receiving messages (INADDR_ANY). If port is 0 or negative, creates an unbound socket (send-only). Returns a handle on success, or 0 on failure.
Uses AF_INET, SOCK_DGRAM, IPPROTO_UDP. Socket is set to non-blocking mode. UDP is connectionless - no connection establishment needed. Use netSendUDPMsg to send datagrams and netRecvUDPMsg to receive. Close with netCloseUDPStream when finished.