HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Working with the Transport Layer 295
Connection API
Is Enabled
Indicates whether the connection is currently in the connection hash and
therefore can be used by SIP Stack objects. The application can insert and
remove a connection from the connection hash. (See the Connection Control
Functions chapter).
CONNECTION
C
REATION AND
I
NITIALIZATION
The Transport API provide the following functions for creating and initializing
new connections:
RvSipTransportMgrCreateConnection()
Constructs a new un-initialized connection. You supply this function with the
connection owner handle and the event handlers to be used for this owner. Each
owner can provide different event handlers. The connection keeps the owner
handle with the event handler pointers of the owner. The owner is notified about
connection events with the specific event handlers that were supplied. The new
created connection always assumes the IDLE state. In the IDLE state the
connection in not yet initialized and cannot be used by persistent SIP Stack
objects.
RvSipTransportConnectionInit()
Initializes a connection with the required configuration parameters. This
function receives a configuration structure of the
RvSipTransportConnectionCfg type that includes the required connection
configuration. You can call this function only in the IDLE connection state.
After initialization is completed, the connection moves to the READY state and
is automatically inserted into the connection hash. The connection can then be
located and used by other SIP Stack persistent objects.
Note This function does not connect the connection. The connection will be
automatically connected when a SIP Stack object uses it for sending a message or
if you specifically call the RvSipTransportConnectionConnect() function. In both
cases, the connection will assume the CONNECTING and then the
TCP_CONNECTED states.
CONNECTION C ONTROL
FUNCTIONS
The following API functions provide connection control: