TipcSrvConnMsgInsert insert message into the queue of the connection
srv
connection handle 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 TipcSrvConnMsgInsert fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvConnMsgInsert 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.
TipcSrvConnMsgInsert may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvConnMsgInsert inserts the message into the message queue of the warm connection. See TipcSrvConnOpen for more information on automatic creation of connections and warm connections to RTserver.
Do not call TipcMsgDestroy to destroy the message passed to TipcSrvConnMsgInsert, because TipcSrvConnMsgInsert takes responsibility for destroying the message.
TipcConnMsgInsert, TipcSrvConnMsgNext
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 (!TipcSrvConnMsgInsert(srv, 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 |