TipcSrvConnSetUsernamePassword


Name

TipcSrvConnSetUsernamePassword — set the basic credentials of the connection to RTserver

Synopsis

T_BOOL TipcSrvConnSetUsernamePassword(srv, username, password) 
T_IPC_SRV srv; 
T_STR username; 
T_STR password; 

Arguments

srv — the connection to RTserver

username — username to use for basic credentials

password — password to use for basic credentials

Return Values

TRUE if the basic credentials were successfully set for the connection to RTserver, FALSE otherwise.

Diagnostics

If TipcSrvConnSetUsernamePassword fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TipcSrvConnSetUsernamePassword sets the basic credentials of the connection to RTserver. When RTserver has enabled Basic Security, the basic credentials are used to authenticate the connection. If authentication fails, an error code is set when TipcSrvCreate is called.

For more information on Basic Security, see the TIBCO SmartSockets User’s Guide.

See Also

TipcSrvConnOpen

Examples

This example sets the connection’s basic credentials and attempts to make a connection to the RTserver:

if (!TipcSrvConnSetUsernamePassword(srv, argv[1], argv[2])) { 
  return;  /* error */ 
} 
 
if (!TipcSrvConnOpen(srv, T_IPC_SRV_CONN_FULL)) { 
  return;  /* error */ 
} 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com