TipcMsgNextInt2Array get an INT2_ARRAY field from a message
T_BOOL TipcMsgNextInt2Array(msg
,int2_array_return
,array_size_return
) T_IPC_MSGmsg
; T_INT2 **int2_array_return
; T_INT4 *array_size_return
;
msg
message to get field from
int2_array_return
storage for INT_ARRAY value from field
array_size_return
storage for number of elements in array
TRUE
if the field was successfully retrieved from the message, FALSE
otherwise.
If TipcMsgNextInt2Array fails, it returns FALSE
and sets the global SmartSockets error number to one of:
msg
was null, int2_array_return
was null, or array_size_return
was nullmsg
was not a valid messageTipcMsgNextInt2Array retrieves the value of the current field of a message, which must be an INT2_ARRAY (array of two-byte integers) field. If TipcMsgNextInt2Array succeeds, it advances the current field to the next field in the message.
TipcMsgNextInt2Array converts the field into the data format used by this process if necessary.
If TipcMsgNextInt2Array returns FALSE
, it does not store values in int2_array_return
and array_size_return
.
Do not modify the value stored in int2_array_return
. It points directly into an internal data structure.
TipcMsgAppendInt2Array, TipcMsgAppendInt2ArrayPtr
This example reads an INT2_ARRAY field from a message and prints the values in the array:
T_INT2 *int2_array; T_INT4 array_size; T_INT4 counter; if (!TipcMsgNextInt2Array(msg, &int2_array, &array_size)) {return
; /* error */
} TutOut("array_size = %d\n", array_size); for (counter = 0; counter < array_size; counter++) { TutOut("int2_array[%d] = %d\n", counter, int2_array[counter]); }
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |