TipcMsgGetPacketSize


Name

TipcMsgGetPacketSize — get the packet size of a message in bytes

Synopsis

T_BOOL TipcMsgGetPacketSize(msg, packet_size_return) 
T_IPC_MSG msg; 
T_UINT4 *packet_size_return; 

Arguments

msg — message to get packet size from

packet_size_return — storage for message packet size

Return Values

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

Diagnostics

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

Description

TipcMsgGetPacketSize gets the packet size of a message. A message is implemented internally with several blocks of memory:

TipcMsgGetPacketSize calculates how many bytes of memory are needed for the entire message. TipcMsgGetPacketSize is useful for determining the size of a message for bandwidth estimates.

Caution

If TipcMsgGetPacketSize returns FALSE, it does not store a value in packet_size_return.

See Also

None

Examples

This example determines the size of a message:

T_UINT4 packet_size; 
 
/* get the number of bytes needed for the single packet of memory */ 
if (!TipcMsgGetPacketSize(msg, &packet_size)) { 
  return;  /* error */ 
} 

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