HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
304 HP-UX C SIP Stack Programmer’s Guide
Server Connections
RvSipTransportConnectionStateChangedEv()
A server connection is a stateful object that can assume different states
according to the Connection state machine. Through this callback, you receive
notifications of server connection state changes and the associated state change
reason.
Note This callback signature is identical to the callback used for client
connection state changes, and the states used for server connections are a subset
of the client connection states.
SERVER CONNECTION
STATES
The server connection states are a subset of the connection states. For more
information, see Connection States. The TransportMgr
RvSipTransportConnectionStateChangedEv() callback reports server
connection state changes and state change reasons. The state change reason
indicates why the server connection reached the new state.
The server connection associates with the following states:
RVSIP_TRANSPORT_CONN_STATE_IDLE
The IDLE state is the initial state of the Connection state machine. Upon
creation of the connection, the connection assumes the IDLE state. Since the
server connection is created upon accepting the incoming connection, it moves
to the CONNECTED state immediately after the
RvSipTransportConnectionCreatedEv() is reported to the application. If the
application requests the SIP Stack to drop the connection, the connection will
move to the TERMINATED state instead of the CONNECTED state.
RVSIP_TRANSPORT_CONN_STATE_TCP_CONNECTED
The server connection moves to the TCP_CONNECTED state immediately
after creation if the application approved the connection and did not request to
drop it (through the RvSipTransportConnectionCreatedEv() callback OUT
parameter). While in this state, the connection can receive and send SIP
messages. Closing the connection by the remote side will move the connection
to the CLOSED state and the connection from the TCP_CONNECTED to
CLOSED state.
Note It is highly recommended not to close the connection using the
RvSipTransportConnectionTerminate() function.