TipcSrvSetCredentials


Name

TipcSrvSetCredentials — set the credentials of the connection to RTserver

Synopsis

T_BOOL TipcSrvSetCredentials(auth_policy_id, auth_data, auth_data_len) 
T_INT4 auth_policy_id; 
T_PTR auth_data; 
T_INT4 auth_data_len; 

Arguments

auth_policy_id — authentication policy identifier

auth_data — authentication data specified by the authentication policy identifier

auth_data_len — size of the authentication data (in bytes)

Return Values

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

Diagnostics

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

Description

TipcSrvSetCredentials sets the credentials of the connection to RTserver. The credentials are used to authenticate the connection. If authentication fails an appropriate error code is set when TipcSrvCreate is called. Calling TutErrNumGet returns the error code.

Caution

None

See Also

TipcSrvCreate

Examples

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

#define AUTH_BASIC 1 
 
T_STR user_pass = "jdoe:387203"; 
 
if (!TipcSrvSetCredentials(AUTH_BASIC, user_pass, 
strlen(user_pass)) { 
  return;  /* error */ 
}  
 
if (!TipcSrvCreate(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