setConnectionParms

setConnectionParms — sets the connection parameters.

Syntax

For C++:

void setConnectionParms(LPCTSTR  hostname,
 LPCTSTR  servicename);
void setConnectionParms(LPCTSTR  hostname,
 int  port);
void setConnectionParms(LPCTSTR  hostname,
 int  port,
 LPCTSTR  username,
 LPCTSTR  password);

For Java and C#:

void setConnectionParms(String  hostname,
 int  port);
void setConnectionParms(String  hostname,
 int  port,
 String  username,
 String  password);

Parameters

hostname

The name of the host running the DataHub.

servicename

The name of the port on which to connect.

port

The connection port number.

username

The name of a user.

password

A password for that user.

Description

This method sets the connection parameters to be used by the openConnection method. The port may be specified as either a string or directly by its number. The string may represent the port number, which is simply converted to an integer, or the symbolic port servicename. If a servicename is specified, then a lookup is performed immediately, and the resulting port number may be verified by following with a call to getPort.

The expanded syntax allows for setting the user name and password. See setUsername for more details.