TipcMsgPrintError report an error about an unexpected message
msg
message for error report
TRUE
if the error report was successfully output, FALSE
otherwise.
If TipcMsgPrintError
fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcMsgPrintError is used to report an error for an unexpected message. An unexpected message is one that has no connection process callbacks for the message’s type. Call TipcMsgPrintError with a connection default callback, as these callbacks are called only for message types without any process callbacks. The first line of the error report has the form:
The time printed is the current data time from TutGetCurrentTime, and it is printed using the format specified in the option Time_Format. TipcMsgPrintError then prints the contents of the message with TipcMsgPrint.
None
TipcConnDefaultCbCreate, TipcSrvDefaultCbCreate
This example creates a message default callback that uses TipcMsgPrintError to inform the user of an unexpected message from RTserver:
static void T_ENTRY default_cb(conn, data, arg) T_IPC_CONN conn; T_IPC_CONN_DEFAULT_CB_DATA data; T_CB_ARG arg; { if (!TipcMsgPrintError(data->msg)) {return
; /* error */
} }/* default_cb */
/* =========================================================== */
/*...code from calling function is below */
if (TipcSrvDefaultCbCreate(default_cb, NULL)) {return
; /* error */
}
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |