TipcSrvMsgInsert insert message into queue of the connection to RTserver
msg
message to insert
pos
position to insert message
TRUE
if the message was successfully inserted into the queue in the connection to RTserver, FALSE
otherwise.
If TipcSrvMsgInsert fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvMsgInsert inserts a message into the message queue of the connection to RTserver by calling TipcConnMsgInsert. A connection has a priority queue of incoming messages. See TipcConnMsgInsert for more information on inserting a message into a connection message queue.
TipcSrvMsgInsert may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvMsgInsert inserts the message into the message queue of the warm connection. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.
Do not call TipcMsgDestroy to destroy the message passed to TipcSrvMsgInsert, as TipcSrvMsgInsert takes responsibility for destroying the message.
TipcConnMsgInsert, TipcSrvMsgNext
This example constructs a message and inserts it onto the front of the message queue of the connection to RTserver:
T_IPC_MT mt; T_IPC_MSG msg; mt = TipcMtLookupByNum(T_MT_NUMERIC_DATA); if (mt == NULL) {return
; /* error */
} msg = TipcMsgCreate(mt); if (msg == NULL) {return
; /* error */
} if (!TipcMsgAppendStrReal8(msg, "temperature", 98.6)) {return
; /* error */
} if (!TipcSrvMsgInsert(msg, 0)) {return
; /* error */
}/* At this point, msg "belongs" to the connection to RTserver, */
/* and should not be destroyed by the caller */
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |