Global Connection Functions (TipcSrv*)


The TipcSrv* functions are used for communication between a client program (RTclient) and RTserver. These functions enable the publish-subscribe message delivery services of SmartSockets.

Global Connection Callback Functions (TipcCbSrv* and TipcSrv*Cb*)

TipcCbSrvError — callback to handle errors on the connection to RTserver

void TipcCbSrvError(conn, data, arg) 
T_IPC_CONN conn; 
T_IPC_CONN_ERROR_CB_DATA data; 
T_CB_ARG arg; 

TipcCbSrvProcessControl — callback to process CONTROL messages from RTserver

void TipcCbSrvProcessControl(conn, data, arg) 
T_IPC_CONN conn; 
T_IPC_CONN_PROCESS_CB_DATA data; 
T_CB_ARG arg; 

TipcCbSrvProcessGmdFailure — callback on connection to RTserver to process GMD_FAILURE messages when GMD fails

void TipcCbSrvProcessGmdFailure(conn, data, arg) 
T_IPC_CONN conn; 
T_IPC_CONN_PROCESS_CB_DATA data; 
T_CB_ARG arg; 

TipcSrvCreateCbCreate — create a server create callback

T_CB TipcSrvCreateCbCreate(func, arg) 
T_IPC_SRV_CREATE_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvCreateCbLookup — look up a server create callback

T_CB TipcSrvCreateCbLookup(func, arg) 
T_IPC_SRV_CREATE_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvDefaultCbCreate — create a default callback in the connection to RTserver

T_CB TipcSrvDefaultCbCreate(func, arg) 
T_IPC_CONN_DEFAULT_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvDefaultCbLookup — look up a default callback in the connection to RTserver

T_CB TipcSrvDefaultCbLookup(func, arg) 
T_IPC_CONN_DEFAULT_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvDestroyCbCreate — create a server destroy callback

T_CB TipcSrvDestroyCbCreate(func, arg) 
T_IPC_SRV_DESTROY_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvDestroyCbLookup — look up a server destroy callback

T_CB TipcSrvDestroyCbLookup(func, arg) 
T_IPC_SRV_DESTROY_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvErrorCbCreate — create an error callback in the connection to RTserver

T_CB TipcSrvErrorCbCreate(func, arg) 
T_IPC_CONN_ERROR_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvErrorCbLookup — look up an error callback in the connection to RTserver

T_CB TipcSrvErrorCbLookup(func, arg) 
T_IPC_CONN_ERROR_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvGetCurrentConnectedLcn — get the logical connection name of the RTserver to which this RTclient is connected

T_BOOL TipcSrvGetCurrentConnectedLcn(lcn_return) 
T_STR lcn_return; 

TipcSrvProcessCbCreate — create a process callback in the connection to RTserver

T_CB TipcSrvProcessCbCreate(mt, func, arg) 
T_IPC_MT mt; 
T_IPC_CONN_PROCESS_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvProcessCbLookup — look up a process callback in the connection to RTserver

T_CB TipcSrvProcessCbLookup(mt, func, arg) 
T_IPC_MT mt; 
T_IPC_CONN_PROCESS_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvQueueCbCreate — create a queue callback in the connection to RTserver

T_CB TipcSrvQueueCbCreate(mt, func, arg) 
T_IPC_MT mt; 
T_IPC_CONN_QUEUE_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvQueueCbLookup — look up a queue callback in the connection to RTserver

T_CB TipcSrvQueueCbLookup(mt, func, arg) 
T_IPC_MT mt; 
T_IPC_CONN_QUEUE_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvReadCbCreate — create a read callback in the connection to RTserver

T_CB TipcSrvReadCbCreate(mt, func, arg) 
T_IPC_MT mt; 
T_IPC_CONN_READ_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvReadCbLookup — look up a read callback in the connection to RTserver

T_CB TipcSrvReadCbLookup(mt, func, arg) 
T_IPC_MT mt; 
T_IPC_CONN_READ_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvSubjectCbCreate — create a subject callback

T_CB TipcSrvSubjectCbCreate(subject, mt, func, arg) 
T_STR subject; 
T_IPC_MT mt; 
T_IPC_SRV_SUBJECT_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvSubjectCbDestroyAll— destroy all subject callbacks

T_BOOL TipcSrvSubjectCbDestroyAll(void) 

TipcSrvSubjectCbLookup — lookup a subject callback

T_CB TipcSrvSubjectCbLookup(subject, mt, func, arg) 
T_STR subject; 
T_IPC_MT mt; 
T_IPC_SRV_SUBJECT_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvSubjectDefaultCbCreate — create a default subject callback

T_CB TipcSrvSubjectDefaultCbCreate(func, arg) 
T_IPC_SRV_SUBJECT_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvSubjectDefaultCbLookup — look up a default subject callback

T_CB TipcSrvSubjectDefaultCbLookup(func, arg) 
T_IPC_SRV_SUBJECT_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvTraverseCbCreate — create a connection names traverse callback

T_CB TipcSrvTraverseCbCreate(func, arg) 
T_IPC_SRV_TRAVERSE_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvTraverseCbLookup — look up a connection names traverse callback

T_CB TipcSrvTraverseCbLookup(func, arg) 
T_IPC_SRV_TRAVERSE_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvWriteCbCreate — create a write callback in the connection to RTserver

T_CB TipcSrvWriteCbCreate(mt, func, arg) 
T_IPC_MT mt; 
T_IPC_CONN_WRITE_CB_FUNC func; 
T_CB_ARG arg; 

TipcSrvWriteCbLookup — look up a write callback in the connection to RTserver

T_CB TipcSrvWriteCbLookup(mt, func, arg) 
T_IPC_MT mt; 
T_IPC_CONN_WRITE_CB_FUNC func; 
T_CB_ARG arg; 

Subject Functions (TipcSrv*Subject*)

The TipcSrv*Subject* functions are used to work with subjects.

TipcSrvStdSubjectSetSubscribe — start or stop subscribing to all standard subjects

T_BOOL TipcSrvStdSubjectSetSubscribe(subscribe_status, time_status) 
T_BOOL subscribe_status; 
T_BOOL time_status; 

TipcSrvSubjectGetSubscribe — determine whether an RTclient is subscribing to a subject

T_BOOL TipcSrvSubjectGetSubscribe(subject, subscribe_status_return) 
T_STR subject; 
T_BOOL *subscribe_status_return; 

TipcSrvSubjectGetSubscribeLb — determine whether an RTclient is subscribing to a subject, including load balancing information

T_BOOL TipcSrvSubjectGetSubscribeLb(subject, subscribe_status_return,  
lb_status_return) 
T_STR subject; 
T_BOOL *subscribe_status_return; 
T_BOOL *lb_status_return; 

TipcSrvSubjectGmdInit — initialize GMD accounting in RTserver for a subject to which messages will be published

T_BOOL TipcSrvSubjectGmdInit(subject) 
T_STR subject; 

TipcSrvSubjectLbInit — initialize load balancing accounting in RTserver for a subject to which messages will be published

T_BOOL TipcSrvSubjectLbInit(subject) 
T_STR subject; 

TipcSrvSubjectSetSubscribe — start or stop subscribing to a subject

T_BOOL TipcSrvSubjectSetSubscribe(subject, subscribe_status) 
T_STR subject; 
T_BOOL subscribe_status; 

TipcSrvSubjectSetSubscribeEx — start or stop subscribing to a subject using extended options

T_BOOL TipcSrvSubjectSetSubscribeEx(subj_name, status, type, flags,  
type_specific_struct) 
T_STR subj_name; 
T_BOOL status; 
T_INT4 type; 
T_INT4 flags; 
T_PTR type_specific_struct; 

TipcSrvSubjectSetSubscribeLb — start or stop subscribing to a subject, with or without load balancing

T_BOOL TipcSrvSubjectSetSubscribeLb(subject, subscribe_status, 
lb_status) 
T_STR subject; 
T_BOOL subscribe_status; 
T_BOOL lb_status; 

TipcSrvSubjectTraverseSubscribe — traverse the subjects that the RTclient is subscribing to

T_PTR TipcSrvSubjectTraverseSubscribe(func, arg) 
T_IPC_SRV_SUBJECT_TRAV_FUNC func; 
T_PTR arg; 

GMD Functions (TipcSrvGmd*)

The TipcSrvGmd* functions are used to work with the guaranteed message delivery services of SmartSockets when using the publish-subscribe communication mode.

TipcSrvGmdFileCreate — create a GMD area on the connection to RTserver

T_BOOL TipcSrvGmdFileCreate() 

TipcSrvGmdFileDelete — delete GMD files for the connection to RTserver

T_BOOL TipcSrvGmdFileDelete() 

TipcSrvGmdMsgDelete — delete a message from the GMD area after a GMD failure on the connection to RTserver

T_BOOL TipcSrvGmdMsgDelete(msg) 
T_IPC_MSG msg; 

TipcSrvGmdMsgServerDelete — delete a message in RTserver after a GMD failure on the connection to RTserver

T_BOOL TipcSrvGmdMsgServerDelete(msg) 
T_IPC_MSG msg; 

TipcSrvGmdMsgStatus — poll RTserver for GMD status of a message

T_BOOL TipcSrvGmdMsgStatus(msg) 
T_IPC_MSG msg; 

Miscellaneous Functions (TipcSrv*)

These functions do not fit in with any other categories. The miscellaneous functions are used for tasks such as creating a connection to RTserver, destroying a connection to RTserver, checking if an RTserver is running, checking if an RTserver is still alive, and stopping an RTserver.

TipcSrvCheck — check if data can be read from or written to connection to RTserver

T_BOOL TipcSrvCheck(check_mode, timeout) 
T_IO_CHECK_MODE check_mode; 
T_REAL8 timeout; 

TipcSrvCreate — create the connection to RTserver

T_BOOL TipcSrvCreate(create_status) 
T_IPC_SRV_CONN_STATUS create_status; 

TipcSrvDestroy — destroy the connection to RTserver

T_BOOL TipcSrvDestroy(destroy_status) 
T_IPC_SRV_CONN_STATUS destroy_status; 

TipcSrvIsRunning — check if the RTclient can create a connection to RTserver

T_BOOL TipcSrvIsRunning() 

TipcSrvKeepAlive — check if the connection to RTserver is still alive

T_BOOL TipcSrvKeepAlive() 

TipcSrvLock — acquire exclusive access to the connection to RTserver

T_BOOL TipcSrvLock() 

TipcSrvLogAddMt — add a message type to a message file logging type

T_BOOL TipcSrvLogAddMt(log_type, mt) 
T_IPC_SRV_LOG_TYPE log_type; 
T_IPC_MT mt; 

TipcSrvLogRemoveMt — remove a message type from a message file logging type

T_BOOL TipcSrvLogRemoveMt(log_type, mt) 
T_IPC_SRV_LOG_TYPE log_type; 
T_IPC_MT mt; 

TipcSrvPrint — print all information about the connection to RTserver in a portable, reproducible format

T_BOOL TipcSrvPrint(func) 
T_OUT_FUNC func; 

TipcSrvStop — stop RTserver and possibly more processes

T_BOOL TipcSrvStop(stop_type) 
T_IPC_SRV_STOP_TYPE stop_type; 

TipcSrvUnlock — release exclusive access to the connection to RTserver

T_BOOL TipcSrvUnlock() 

Property Get Functions (TipcSrvGet*)

The TipcSrvGet* functions are used to retrieve the values of the properties of a connection to RTserver.

TipcSrvGetArch — determine the architecture name of the connected RTserver

T_BOOL TipcSrvGetArch(arch_return) 
T_STR *arch_return; 

TipcSrvGetAutoFlushSize — determine the automatic flush size of the connection to RTserver

T_BOOL TipcSrvGetAutoFlushSize(auto_flush_size_return) 
T_INT4 *auto_flush_size_return; 

TipcSrvGetBlockMode — determine the block mode of the connection to RTserver

T_BOOL TipcSrvGetBlockMode(block_mode_return) 
T_BOOL *block_mode_return; 

TipcSrvGetConnStatus — determine the status of the connection to RTserver

T_BOOL TipcSrvGetConnStatus(conn_status_return) 
T_IPC_SRV_CONN_STATUS *conn_status_return; 

TipcSrvGetGmdMaxSize — determine the GMD area maximum size of the connection to RTserver

T_BOOL TipcSrvGetGmdMaxSize(gmd_max_size_return) 
T_UINT4 *gmd_max_size_return; 

TipcSrvGetGmdNumPending — determine the number of outgoing GMD messages still pending on the connection to RTserver

T_BOOL TipcSrvGetGmdNumPending(gmd_num_pending_return) 
T_INT4 *gmd_num_pending_return; 

TipcSrvGetNumQueued — get the number of queued messages from the connection to RTserver

T_BOOL TipcSrvGetNumQueued(num_queued_return) 
T_INT4 *num_queued_return; 

TipcSrvGetSocket — determine the socket of the connection to RTserver

T_BOOL TipcSrvGetSocket(socket_return) 
T_INT4 *socket_return; 

TipcSrvGetTimeout — get a timeout property from the connection to RTserver

T_BOOL TipcSrvGetTimeout(timeout, value_return) 
T_IPC_TIMEOUT timeout; 
T_REAL8 *value_return; 

TipcSrvGetXtSource — get source suitable for XtAppAddInput from the connection to RTserver

T_BOOL TipcSrvGetXtSource(source_return) 
T_INT4 *source_return; 

Property Set Functions (TipcSrvSet*)

The TipcSrvSet* functions are used to set the values of the properties of a connection to RTserver.

TipcSrvSetAutoFlushSize — set the automatic flush size of the connection to RTserver

T_BOOL TipcSrvSetAutoFlushSize(auto_flush_size) 
T_INT4 auto_flush_size; 

TipcSrvSetBlockMode — set the block mode of the connection to RTserver

T_BOOL TipcSrvSetBlockMode(block_mode) 
T_BOOL block_mode; 

TipcSrvSetGmdMaxSize — set the GMD area maximum size of the connection to RTserver

T_BOOL TipcSrvSetGmdMaxSize(gmd_max_size) 
T_UINT4 gmd_max_size; 

TipcSrvSetSocket — set the socket of the connection to RTserver

T_BOOL TipcSrvSetSocket(socket) 
T_INT4 socket; 

TipcSrvSetTimeout — set a timeout property of the connection to RTserver

T_BOOL TipcSrvSetTimeout(timeout, value) 
T_IPC_TIMEOUT timeout; 
T_REAL8 value; 

TipcSrvSetUsernamePassword — set the basic credentials of the connection to RTserver

T_BOOL TipcSrvSetUsernamePassword(username, password) 
T_STR username; 
T_STR password; 

Peer Property Get Functions (TipcSrvGet*)

These TipcSrvGet* functions are used to retrieve the values of the properties of a peer connection to RTserver.

TipcSrvGetNode — determine the node name of the connected RTserver

T_BOOL TipcSrvGetNode(node_return) 
T_STR *node_return; 

TipcSrvGetPid — determine the process ID of the connected RTserver

T_BOOL TipcSrvGetPid(pid_return) 
T_INT4 *pid_return; 

TipcSrvGetUniqueSubject — determine the unique subject of the connected RTserver

T_BOOL TipcSrvGetUniqueSubject(unique_subject_return) 
T_STR *unique_subject_return; 

TipcSrvGetUser — determine the user name of the connected RTserver

T_BOOL TipcSrvGetUser(user_return) 
T_STR *user_return; 

Reading and Processing Messages from RTserver (TipcSrv*)

These functions are used to read, process, or search for messages arriving from RTserver.

TipcSrvMainLoop — read and process messages on the connection to RTserver

T_BOOL TipcSrvMainLoop(timeout) 
T_REAL8 timeout; 

TipcSrvMsgNext — retrieve the next message from the connection to RTserver

T_IPC_MSG TipcSrvMsgNext(timeout) 
T_REAL8 timeout; 

TipcSrvMsgProcess — process a message in the connection to RTserver

T_BOOL TipcSrvMsgProcess(msg) 
T_IPC_MSG msg; 

TipcSrvMsgSearch — search the message queue of the connection to RTserver for a specific message

T_IPC_MSG TipcSrvMsgSearch(timeout, func, arg) 
T_REAL8 timeout; 
T_IPC_CONN_MSG_SEARCH_FUNC func; 
T_PTR arg; 

TipcSrvMsgSearchType — search the message queue of a connection to RTserver for a message with a specific type

T_IPC_MSG TipcSrvMsgSearchType(timeout, mt) 
T_REAL8 timeout; 
T_IPC_MT mt; 

TipcSrvRead — read all available data from the connection to RTserver and queue messages in priority order

T_BOOL TipcSrvRead(timeout) 
T_REAL8 timeout; 

Publishing Messages (TipcSrv*)

These functions are used to publish messages using RTserver.

TipcSrvFlush — flush buffered outgoing messages on the connection to RTserver

T_BOOL TipcSrvFlush() 

TipcSrvMsgInsert — insert a message into the queue of the connection to RTserver

T_BOOL TipcSrvMsgInsert(msg, pos) 
T_IPC_MSG msg; 
T_INT4 pos; 

TipcSrvMsgSend — send a message through the connection to RTserver

T_BOOL TipcSrvMsgSend(msg, check_server_msg_send) 
T_IPC_MSG msg; 
T_BOOL check_server_msg_send; 

TipcSrvMsgSendRpc — make a remote procedure call (RPC) with messages on the connection to RTserver

T_IPC_MSG TipcSrvMsgSendRpc(call_msg, timeout) 
T_IPC_MSG call_msg; 
T_REAL8 timeout; 

TipcSrvMsgWrite — construct a message and send it through the connection to RTserver

T_BOOL TipcSrvMsgWrite(dest, mt, check_server_msg_send, ...) 
T_STR dest; 
T_IPC_MT mt; 
T_BOOL check_server_msg_send; 

TipcSrvMsgWriteVa — construct a message and send it through the connection to RTserver (va_list version)

T_BOOL TipcSrvMsgWriteVa(dest, mt, check_server_msg_send, var_arg_list) 
T_STR dest; 
T_IPC_MT mt; 
T_BOOL check_server_msg_send; 
va_list var_arg_list; 

TIBCO SmartSockets™ API Quick Reference
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com