TipcMsgAppendInt4


Name

TipcMsgAppendInt4 — append a field containing an array of INT4 fields to a message

Synopsis

T_BOOL TipcMsgAppendInt4(msg, int4_data) 
T_IPC_MSG msg; 
T_INT4 int4_data; 

Arguments

msg — message to append field to

int4_data — data for new message field

Return Values

TRUE if the field was successfully appended to the message, FALSE otherwise.

Diagnostics

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

Description

TipcMsgAppendInt4 appends a four-byte integer (INT4) field containing int4_data to the end of a message’s data.

Caution

None

See Also

TipcMsgNextInt4

Examples

This example creates a message and appends an INT4 field:

T_IPC_MT mt; 
T_IPC_MSG msg; 
 
#define USER_MT_INT4_TEST 100 
mt = TipcMtCreate("int4_test", USER_MT_INT4_TEST, "int4"); 
if (mt == NULL) { 
  return;  /* error */ 
} 
 
msg = TipcMsgCreate(mt); 
if (msg == NULL) { 
  return;  /* error */ 
} 
 
/* An RTclient would typically set the destination of */ 
/* a message at this point by calling TipcMsgSetDest. */ 
 
if (!TipcMsgAppendInt4(msg, 42000000)) { 
  return;  /* error */ 
}  
 
/* A process would typically send a message at this point by */ 
/* calling TipcConnMsgSend or TipcSrvMsgSend. */ 
 
/* A process would typically destroy a message at this point by */ 
/* calling TipcMsgDestroy. */ 

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