HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

296 HP-UX C SIP Stack Programmers Guide
Connection API
RvSipTransportConnectionConnect()
Connects the connection. You can call this function only in the READY state.
Calling this function will cause the connection to move to the CONNECTING
state. The connection will move to the TCP_CONNECTED state when an
indication is received from the network that the connection was successfully
connected.
RvSipTransportConnectionTerminate()
The behavior of this function depends on the connection state. If the connection
is in the TCP_CONNECTED state, the connection will start a normal
disconnection process. Connections will move to the CLOSING state. TLS
connections will first perform TLS closing procedures and then will move to the
CLOSING state.
For all other states, the connection will close its internal socket if the socket was
opened, and will terminate. After termination, the connection will assume the
TERMINATED state.
Note If the connection has messages that it is about to send, the messages will be
lost. It is, therefore, not recommended to use this function. If you no longer need
this connection, call the RvSipTransportConnectionDetachOwner() function. The
connection will be closed only when the last owner is detached. This means that
if the connection is still being used by other SIP Stack objects, it will not be closed
until these objects detach from it.
RvSipTransportConnectionAttachOwner()
Attaches a new owner to the supplied connection with a set of callback functions
that will be used to notify this owner about connection events. You can use this
function only if the connection is connected or is in the process of being
connected. You cannot attach an owner to a connection that started its
disconnection process.
Note The connection will not disconnect as long as it has owners attached to it.