TipcSrvSetCredentials set the credentials of the connection to RTserver
T_BOOL TipcSrvSetCredentials(auth_policy_id
,auth_data
,auth_data_len
) T_INT4auth_policy_id
; T_PTRauth_data
; T_INT4auth_data_len
;
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)
TRUE
if the credentials were successfully set for the connection to RTserver, FALSE
otherwise.
If TipcSrvSetCredentials fails, it returns FALSE
and sets the global SmartSockets error number to one of:
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.
None
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 |