TipcMsgNextType


Name

TipcMsgNextType — get the field type of the current field of a message

Synopsis

T_BOOL TipcMsgNextType(msg, ft_return) 
T_IPC_MSG msg; 
T_IPC_FT *ft_return; 

Arguments

msg — message to get field type from

ft_return — storage for field type

Return Values

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

Diagnostics

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

Description

TipcMsgNextType retrieves the type of the current field of a message. TipcMsgNextType does not advance the current field to the next field in the message.

Caution

If TipcMsgNextType returns FALSE, it does not store a value in ft_return.

See Also

TipcMsgNext* (TipcMsgNextBinary through TipcMsgNextXml), TipcMsgGetType

Examples

This example creates a message, appends a REAL8 field, and reads the field type back from the message:

T_IPC_MT mt; 
T_IPC_MSG msg; 
T_IPC_FT ft; 
 
#define USER_MT_REAL8_TEST 100 
mt = TipcMtCreate("real8_test", USER_MT_REAL8_TEST, "real8"); 
if (mt == NULL) { 
  return;  /* error */ 
} 
 
msg = TipcMsgCreate(mt); 
if (msg == NULL) { 
  return;  /* error */ 
} 
 
if (!TipcMsgAppendReal8(msg, 42.0)) { 
  return;  /* error */ 
}  
if (!TipcMsgSetCurrent(msg, 0)) { 
  return;  /* error */ 
}  
if (!TipcMsgNextType(msg, &ft)) { 
  return;  /* error */ 
}  
TutOut("ft == %d\n", ft); 

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