setUsername

setUsername — stores a user name and password for this connection.

Syntax

For C++:

void setUsername(LPCTSTR  username,
 LPCTSTR  password);

For Java and C#:

public void setUsername(String  username,
 String  password);

Parameters

username

The name of a user.

password

A password for that user.

Description

This method stores a user name and password for this connection, to be transmitted by a subsequent call to sendLogin. When a subsequent successful connection is made to the DataHub, sendLogin will be called prior to the onConnectionSuccess callback. The .Net and Java implementations of setUsername will disconnect from the DataHub if the connection is currently active. The C++ implementation will not. If either of the username or password parameters is "" or NULL, then no username or password will be sent on the next successful connection.

See Also

sendLogin, setConnectionParms