TipcMsgGetType get the type of a message
msg
message to get type from
mt_return
storage for message type
TRUE
if the type was successfully retrieved from the message, FALSE
otherwise.
If TipcMsgGetType fails, it returns FALSE
and sets the global SmartSockets error number to:
TipcMsgGetType gets the type of a message. The type identifies the category of message being manipulated. Most connection callback types use a message type, for example, to allow various kinds of execution based on specific message types.
If TipcMsgGetType returns FALSE
, it does not store a value in mt_return
.
TipcMsgSetType, TipcMtLookupByNum, TipcMsgGetTypeNum
This gets the type of a message and prints the name and number of the message type:
void T_ENTRY print_msg_type_name(msg) T_IPC_MSG msg; { T_IPC_MT mt; T_STR name; T_INT4 num; if (!TipcMsgGetType(msg, &mt)) {return
; /* error */
} if (!TipcMtGetName(mt, &name)) {return
; /* error */
} if (!TipcMtGetNum(mt, &num)) {return
; /* error */
} TutOut("msg has type %s (number %d)\n", name, num); }/* print_msg_type_name */
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |