getPort

getPort — retrieves the port connection parameter.

Syntax

For C++, Java, and C#:

int getPort(void);

Returns

The connection port number.

Description

This method retrieves the port number set by the setConnectionParms command, or 0 if it has never been set. If setConnectionParms was used to specify a service name, then the port will be the result of an attempt to convert or look up the servicename specified. The value is not affected by openConnection or the status of the connection.