TipcConn user class for a dummy connection and base class for all other connection classes
The TipcConn class calls the C API function TipcConnCreate at construction. It manages the resulting T_IPC_CONN object internally.
None
TipcConnServer, TipcConnClient
Tobj; see the TIBCO SmartSockets Application Programming Interface for information on TipcConnCreate
Syntax:
|
|
Remarks:
|
_destroy_flag is a flag used by derived classes to control the use of TipcConnDestroy in the class destructor.
|
Syntax:
|
|
Remarks:
|
_msg_referent is a holding place for TipcMsg objects returned by reference by member functions of this class.
|
Syntax:
|
|
Remarks:
|
Get the block mode of a connection.
|
C API:
|
TipcConnGetBlockMode
|
|
|
Syntax:
|
|
Remarks:
|
Set the block mode of a connection.
|
C API:
|
TipcConnSetBlockMode
|
Syntax:
|
|
Remarks:
|
Return the C API T_IPC_CONN structure stored in the protected connection.
|
C API:
|
None
|
Syntax:
|
|
Remarks:
|
Create guaranteed message delivery area on a connection.
|
C API:
|
TipcConnGmdFileCreate
|
Syntax:
|
|
Remarks:
|
Delete guaranteed message delivery files for a connection.
|
C API:
|
TipcConnGmdFileDelete
|
Syntax:
|
|
Remarks:
|
Get the GMD area maximum size of a connection.
|
C API:
|
TipcConnGetGmdMaxSize
|
|
|
Syntax:
|
|
Remarks:
|
Set the GMD area maximum size of a connection.
|
C API:
|
Syntax:
|
|
Remarks:
|
Delete a message from GMD area after a GMD failure on a connection.
|
C API:
|
TipcConnGmdMsgDelete
|
Syntax:
|
|
Remarks:
|
Get the number of outgoing guaranteed messages pending.
|
C API:
|
TipcConnGetGmdNumPending
|
Syntax:
|
|
Remarks:
|
Resend all guaranteed messages after a delivery failure on a connection.
|
C API:
|
TipcConnGmdResend
|
Syntax:
|
|
Remarks:
|
Check if the process at the other end of a connection is still alive.
|
C API:
|
TipcConnKeepAlive
|
Syntax:
|
|
Remarks:
|
Read all available data from a connection and queue messages in priority order.
|
C API:
|
TipcConnRead
|
Syntax:
|
|
Remarks:
|
Search the message queue of a connection for a specific message.
|
C API:
|
TipcConnMsgSearch
|
Syntax:
|
|
Remarks:
|
Search the message queue of a connection for a message with a specific type.
|
C API:
|
TipcConnMsgSearchType
|
Syntax:
|
|
Remarks:
|
Make a remote procedure call (RPC) with messages on a connection.
|
C API:
|
TipcConnMsgSendRpc
|
Syntax:
|
|
Remarks:
|
Get the unique subject of a connection’s peer process.
|
C API:
|
TipcConnGetUniqueSubject
|
Syntax:
|
|
Remarks:
|
Get source suitable for XtAppAddInput from a connection.
|
C API:
|
TipcConnGetXtSource
|
Syntax:
|
|
Remarks:
|
Get name of directory where files are written for guaranteed message delivery.
|
C API:
|
TipcGetGmdDir
|
This code fragment creates a connection, creates process and default callbacks, then reads and processes messages from the message file data.msg
:
// Construct a TipcConn
TipcConn my_conn;// Create a process callback for TIME messages
TipcMt mt_time(T_MT_TIME); if (!mt_time) {// error
} my_conn.ProcessCbCreate(mt_time, process_time, NULL); if (!my_conn) {// error
}// Create a process callback for NUMERIC_DATA messages
TipcMt mt_numeric_data(T_MT_NUMERIC_DATA); if (!mt_numeric_data) {// error
} my_conn.ProcessCbCreate(mt_numeric_data, process_nd, NULL); if (!my_conn) {// error
}// Create a default callback for all other messages
my_conn.DefaultCbCreate(process_default, NULL); if (!my_conn) {// error
}// Create a message file that is open for reading
TipcMsgFile msg_file("data.msg", T_IPC_MSG_FILE_CREATE_READ); if (!msg_file) {// error
}// Read and process messages
TipcMsg msg_read; while (1) { msg_file >> msg_read; if (!msg_file) { break; } my_conn.Process(msg_read); if (!my_conn) {// error
}// Explicitly destroy the message. This step could be skipped
// since the extraction operator will first destroy any message
// that msg_read is managing before assigning a new message to it.
msg_read.Destroy(); }
TIBCO SmartSockets™ cxxipc Class Library Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |