TipcMsgNextUtf8


Name

TipcMsgNextUtf8 — get a UTF8 field from a message

Synopsis

T_BOOL TipcMsgNextUtf8(msg, utf8_return) 
T_IPC_MSG msg; 
T_STR *utf8_return; 

Arguments

msg — message to get field from

utf8_return — storage for UTF8 value from field

Return Values

TRUE if the field was successfully retrieved from the message, FALSE otherwise.

Diagnostics

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

Description

TipcMsgNextUtf8 retrieves the value of the current field of a message, which must be a UTF8 field. If TipcMsgNextUtf8 succeeds, it advances the current field to the next field in the message.

TipcMsgNextUtf8 converts the field into the data format used by this process, if necessary.

Caution

If TipcMsgNextUtf8 returns FALSE, it does not store a value in utf8_return.

Do not modify the value stored in utf8_return. It points directly into an internal data structure.

See Also

TipcMsgAppendUtf8, TipcMsgAppendUtf8Ptr

Examples

This example creates a message, appends an INT8 field, and reads the field back from the message:

T_IPC_MT mt; 
T_IPC_MSG msg; 
T_STR utf8_val; 
 
#define USER_MT_UTF8_TEST 100 
mt = TipcMtCreate("utf8_test", USER_MT_UTF8_TEST, "utf8"); 
if (mt == NULL) { 
  return;  /* error */ 
} 
 
msg = TipcMsgCreate(mt); 
if (msg == NULL) { 
  return;  /* error */ 
} 
 
if (!TipcMsgAppendUtf8(msg, 82000000000)) { 
  return;  /* error */ 
}  
if (!TipcMsgSetCurrent(msg, 0)) { 
  return;  /* error */ 
}  
if (!TipcMsgNextUtf8(msg, &utf8_val)) { 
  return;  /* error */ 
}  
TutOut("utf8_val == " T_UTF8_SPEC "\n", utf8_val); 

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