TipcMtGetCompression


Name

TipcMtGetCompression — get the compression status of a message type

Synopsis

T_BOOL TipcMtGetCompression(mt, compress_return) 
T_IPC_MT mt; 
T_BOOL *compress_return; 

Arguments

mt — message type to get compression status of

compress_return — storage for message type compression status

Return Values

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

Diagnostics

If TipcMtGetCompression fails, it returns FALSE and sets the global SmartSockets error number to:

Description

TipcMtGetCompression gets the compression status of a message type, or whether or not compression is enabled. The compression status of a message type is the default compression status for all messages of this type. When a message is created, its compression status is initialized to the message type compression status.

The compression status of an outgoing message can always be set on a per-message basis, but using message type compression status makes it easier to set the default status for all outgoing messages of a specific type. The standard SmartSockets message types by default all have a compression status of FALSE, but these can be changed. User-defined message types can also use whatever compression status is appropriate.

When a message type is first created, its compression status is initialized to FALSE.

Caution

If TipcMtGetCompression returns FALSE, it does not store a value in compress_return.

See Also

TipcMtSetCompression

Examples

This example gets the compression status of the INFO message type:

T_IPC_MT mt; 
T_BOOL compress; 
 
mt = TipcMtLookup("info"); 
if (mt == NULL) { 
  return;  /* error */ 
} 
if (!TipcMtGetCompression(mt, &compress)) { 
  return;  /* error */ 
} 

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