SOCKET_GETPORT Function

Returns the socket port number for the specified socket connection.

Usage

port = SOCKET_GETPORT(socket) 

Input Parameters

socket—A socket descriptor that was returned from SOCKET_INIT.

Keywords

None.

Output Parameters

port—On success, returns the port number for the socket descriptor; on failure, returns –1.

Discussion

SOCKET_GETPORT returns the port picked by the operating system.

Example

s=SOCKET_INIT(0)
PRINT, 'PORT IS: ', SOCKET_GETPORT(s) 

See Also

SOCKET_INIT

For more detailed information on using the socket routines, see the PV‑WAVE Application Developer’s Guide.