TipcMtSetCompression set the compression status of a message type
mt
message type to set compression status for
compress
the new message type compression status (TRUE
to enable compression, FALSE
to disable)
TRUE
if the compression status was successfully set for the message type, FALSE
otherwise.
If TipcMtSetCompression fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcMtSetCompression sets the compression status of a message type. 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. Use TipcMsgSetCompression to override the message type compression setting on a per-message basis.
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.
TRUE
enables compression for the message type; FALSE
disables compression. The default compression setting for all message types is FALSE
.
Do not send compressed messages to an RT process running on a SmartSockets software release lower than 6.5.0.
Sending a compressed message to an RT process running an earlier version of SmartSockets may result in unexpected behavior. Typically, the RT process running on an earlier version of SmartSockets returns an error code of T_ERR_FT_MISMATCH or T_ERR_FT_INVALID when attempting to access the fields of a compressed message. However, it is also possible for the RT process to retrieve invalid data from the field without generating an error.
TipcMsgSetCompression, TipcMtGetCompression
This example sets the compression status of the INFO
message type TRUE
:
T_IPC_MT mt; mt = TipcMtLookup("info"); if (mt == NULL) {return
; /* error */
} if (!TipcMtSetCompression(mt, T_TRUE)) {return
; /* error */
}
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |