TipcSrvConnSetCredentials


Name

TipcSrvConnSetCredentials — set the credentials of the connection to RTserver

Synopsis

T_BOOL TipcSrvConnSetCredentials(srv, auth_policy_id, auth_data, 
auth_data_len) 
T_IPC_SRV srv; 
T_INT4 auth_policy_id; 
T_PTR auth_data; 
T_INT4 auth_data_len; 

Arguments

srv — connection to RTserver

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 TipcSrvConnSetCredentials fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TipcSrvConnSetCredentials 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 TipcSrvConnOpen is called. Calling TutErrNumGet returns the error code.

Caution

None

See Also

TipcSrvConnOpen

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 (!TipcSrvConnSetCredentials(srv, AUTH_BASIC, user_pass, 
strlen(user_pass)) { 
  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