TipcSrv user class representing the RTclient functionality (corresponding to the TipcSrv* API functions)
static TipcSrv& Instance();
static TipcSrv& InstanceCreate();
static TipcSrv& InstanceCreate(create_status
);
The TipcSrv class provides a C++ interface to the TipcSrv* functions in SmartSockets.
The TipcSrv constructor is protected because in SmartSockets you cannot have more than one RTserver connection per process. Therefore, you are not allowed to construct a TipcSrv instance directly. If this is attempted, the corresponding C++ code does not pass compilation. However, you still need to be able to get a handle to a TipcSrv instance in order to call the TipcSrv* versions of TipcConn* virtual functions inherited from the TipcConn class, and you still need to be able to cause TipcSrvCreate() to be called by some mechanism. For the underlying C function TipcSrvCreate() to be called, you should instead call the static TipcSrv class function InstanceCreate() or Instance(), the difference between these functions being whether TipcSrvCreate gets called or not as a side effect. Because C++ doesn't allow arguments to destructors, the TipcSrv class offers a Destroy() method to let you specify a SmartSockets destroy status. When TipcSrv is destroyed automatically (for example, Destroy() isn’t called, and the TipcSrv reference obtained through Instance() passes out of scope), the T_IPC_SRV_CONN_NONE destroy status is set by default.
None
Syntax:
|
|
Remarks:
|
Get the block mode of the connection to RTserver.
|
C API:
|
TipcSrvGetBlockMode
|
|
|
Syntax:
|
|
Remarks:
|
Set the block mode of the connection to RTserver.
|
C API:
|
TipcSrvSetBlockMode
|
Syntax:
|
|
Remarks:
|
Check if data can be read from or written to the connection to RTserver.
|
C API:
|
TipcSrvCheck
|
Syntax:
|
|
Remarks:
|
Create a default callback in the connection to RTserver.
|
C API:
|
TipcSrvDefaultCbCreate
|
Syntax:
|
|
Remarks:
|
Look up a default callback in the connection to RTserver.
|
C API:
|
TipcSrvDefaultCbLookup
|
Syntax:
|
|
Remarks:
|
Create an error callback in the connection to RTserver.
|
C API:
|
TipcSrvErrorCbCreate
|
Syntax:
|
|
Remarks:
|
Look up an error callback in the connection to RTserver.
|
C API:
|
TipcSrvErrorCbLookup
|
Syntax:
|
|
Remarks:
|
Flush buffered outgoing messages on the connection to RTserver.
|
C API:
|
TipcSrvFlush
|
Syntax:
|
|
Remarks:
|
Create guaranteed message delivery area on the connection to RTserver.
|
C API:
|
TipcSrvGmdFileCreate
|
Syntax:
|
|
Remarks:
|
Delete guaranteed message delivery files for the connection to RTserver.
|
C API:
|
TipcSrvGmdFileDelete
|
Syntax:
|
|
Remarks:
|
Delete a message from the GMD area after a GMD failure on the connection to RTserver.
|
C API:
|
TipcSrvGmdMsgDelete
|
Syntax:
|
|
Remarks:
|
Resend a message after a GMD failure on the connection to RTserver.
|
C API:
|
TipcSrvGmdMsgResend
|
Syntax:
|
|
Remarks:
|
Delete a message in RTserver after a GMD failure on the connection to RTserver.
|
C API:
|
TipcSrvGmdMsgServerDelete
|
Syntax:
|
|
Remarks:
|
Get the number of guaranteed messages pending on connection to RTserver.
|
C API:
|
TipcSrvGetGmdNumPending
|
Syntax:
|
|
Remarks:
|
Resend all guaranteed messages after a delivery failure on the connection to RTserver.
|
C API:
|
TipcSrvGmdResend
|
Syntax:
|
|
Remarks:
|
Get number of queued messages from the connection to RTserver.
|
C API:
|
TipcSrvGetNumQueued
|
Syntax:
|
|
Remarks:
|
Create a process callback in the connection to RTserver.
|
C API:
|
TipcSrvProcessCbCreate
|
Syntax:
|
|
Remarks:
|
Look up a process callback in the connection to RTserver.
|
C API:
|
TipcSrvProcessCbLookup
|
Syntax:
|
|
Remarks:
|
Look up a queue callback in the connection to RTserver.
|
C API:
|
TipcSrvQueueCbLookup
|
Syntax:
|
|
Remarks:
|
Read all available data from the connection to RTserver and queue messages in priority order.
|
C API:
|
TipcSrvRead
|
Syntax:
|
|
Remarks:
|
Search the message queue of the connection to RTserver for a specific message.
|
C API:
|
TipcSrvMsgSearch
|
Syntax:
|
|
Remarks:
|
Search the message queue of the connection to RTserver for a message with a specific type.
|
C API:
|
TipcSrvMsgSearchType
|
Syntax:
|
|
Remarks:
|
Make a remote procedure call (RPC) with a message on the connection to RTserver.
|
C API:
|
TipcSrvMsgSendRpc
|
Syntax:
|
|
Remarks:
|
Get the socket of the connection to RTserver.
|
C API:
|
TipcSrvGetSocket
|
|
|
Syntax:
|
|
Remarks:
|
Set the socket of the connection to RTserver.
|
C API:
|
TipcSrvSetSocket
|
Syntax:
|
|
Remarks:
|
Construct a message and send it through the connection to RTserver.
|
C API:
|
TipcSrvMsgWrite
|
Syntax:
|
|
Remarks:
|
Construct a message and send it through the connection to RTserver (va_list version).
|
C API:
|
TipcSrvMsgWriteVa
|
Syntax:
|
|
Remarks:
|
Get a timeout property of the connection to RTserver.
|
C API:
|
TipcSrvGetTimeout
|
|
|
Syntax:
|
|
Remarks:
|
Set a timeout property of the connection to RTserver.
|
C API:
|
TipcSrvSetTimeout
|
Syntax:
|
|
Remarks:
|
Look up a write callback in the connection to RTserver.
|
C API:
|
TipcSrvWriteCbLookup
|
Syntax:
|
|
Remarks:
|
Get source suitable for XtAppAddInput from the connection to RTserver.
|
C API:
|
TipcSrvGetXtSource
|
Syntax:
|
|
Remarks:
|
Get name of directory where files are written for guaranteed message delivery.
|
C API:
|
TipcGetGmdDir
|
Syntax:
|
|
Remarks:
|
Return a handle to a TipcSrv object. Do not create a connection to RTserver at this time.
|
Syntax:
|
|
Remarks:
|
Retrieve current values for all standard subjects.
|
C API:
|
TipcSrvStdSubjectRetrieve
|
Syntax:
|
|
Remarks:
|
Start or stop subscribing to all standard subjects.
|
C API:
|
TipcSrvStdSubjectSetSubscribe
|
Syntax:
|
|
Remarks:
|
Traverse the subjects to which an RTclient is subscribing.
|
C API:
|
TipcSrvSubjectTraverseSubscribe
|
This code fragment obtains a handle to RTserver by calling the static member function Instance(), creates callbacks, then uses a call to the Create member function to create the actual underlying connection to the server. It then destroys the underlying connection to RTserver.
TipcSrv& rtserver = TipcSrv::Instance(); rtserver.CreateCbCreate(MyCallbacks::cb_server_create, NULL); if (!rtserver) {// error
}// server destroy callback
rtserver.DestroyCbCreate(MyCallbacks::cb_server_destroy, NULL); if (!rtserver) {// error
} cout << "Creating connection to RTserver." << endl; if (!rtserver.Create(T_IPC_SRV_CONN_FULL)) {// error
}// Now Destroy connection to RTserver to show how this can be done.
cout << "Destroying connection to RTserver but leave it warm." << endl; if (!TipcSrv::Destroy(T_IPC_SRV_CONN_WARM)) {// error
}
TIBCO SmartSockets™ cxxipc Class Library Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |