You copied the Doc URL to your clipboard.

6.1.6. udp_socket()

This function is used to obtain a random port number that is suitable for use as the lport parameter in a call to udp_open(). The udp_socket() function avoids picking port numbers in the reserved range 0-1 024, or in the range 1 025-1 199, which may be used for server applications.


int udp_socket(void);

Return value

Returns a UDP port number. This number is the lport parameter that is suitable for passing to udp_open().

Was this page helpful? Yes No