HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Working with the Transport Layer 297
Connection API
RvSipTransportConnectionDetachOwner()
Detaches an owner from the supplied connection. If the connection is left with
no other owners, it will be closed. If the same owner is attached to a connection
more than once, the first matching owner will be removed. After detaching from
a connection, you will stop getting connection events and you must no longer
use the connection handle.
RvSipTransportConnectionEnable()
Inserts a connection into the hash so that persistent objects will be able to use it.
RvSipTransportConnectionDisable()
Removes a connection from the hash so that persistent objects will not be able to
use it. Objects that are already using the connection (that are in the connection
owner’s list) will be able to continue to use the object even though it is out of the
hash. However, other objects will not be able to use the connection as long as
the connection is disabled.
CONNECTION EVENTS The connection supplies several events in the form of callback functions to
which your application may listen and react. To be notified of connection
events, you must first become one of the connection owners. This can happen
when the application created the connection or when it attached itself to an
existing connection. In both cases, the owner supplies its event handler callback
functions. These function are used to notify the owner about the connection
events.
The following events are supplied with the Transport Connection API:
RvSipTransportConnectionStateChangedEv()
The connection is a stateful object that can assume different states according to
the Connection state machine. Through this function, you receive notifications
of connection state changes and the associated state change reason. In a regular
connection life cycle, the reason for the state is set to
RVSIP_TRANSPORT_CONN_REASON_UNDEFINED. When the
connection is closed because of an error, the reason is set to
RVSIP_TRANSPORT_CONN_REASON_ERROR.
Note You do not have to register to this callback if you do not want to get
connection states.