setConnectionParms

setConnectionParms — sets the connection parameters.

Synopsis

For C++:
void setConnectionParms(hostname,  
 servicename); 
LPCTSTR hostname;
LPCTSTR servicename;
 
void setConnectionParms(hostname,  
 port); 
LPCTSTR hostname;
int port;
 
void setConnectionParms(hostname,  
 port,  
 username,  
 password); 
LPCTSTR hostname;
int port;
LPCTSTR username;
LPCTSTR password;
 
For Java and C#:
void setConnectionParms(hostname,  
 port); 
String hostname;
int port;
 
void setConnectionParms(hostname,  
 port,  
 username,  
 password); 
String hostname;
int port;
String username;
String password;
 

Parameters

hostname

The name of the host running the DataHub instance.

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.