HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
302 HP-UX C SIP Stack Programmer’s Guide
Server Connections
}
return RV_OK;
}
/*=========================================================================================*/
When working with calls or subscriptions, a message can be record-routed and
the destination can be determined according to the Route list. For more
information on initiating a TCP call, see the Working with Call-legs (Dialogs)
chapter.
Sample Code
The following sample code demonstrates an implementation of the
RvSipTransportConnectionStateChangedEv() callback function. In this
implementation, the application only prints a message to the screen when the
connection is connected.
/*=====================================================================
static RvStatus RVCALLCONV AppConnStateChangedEv(
IN RvSipTransportConnectionHandle hConn,
IN RvSipTransportConnectionOwnerHandle hOwner,
IN RvSipTransportConnectionState eState,
IN RvSipTransportConnectionStateChangedReason eReason)
{
switch(eState) {
case RVSIP_TRANSPORT_CONN_STATE_TCP_CONNECTED:
printf("Connection %x state changed to TCP CONNECTED\n");
break;
default:
break;
}
return RV_OK;
}
/*===================================================================*/
SERVER
C
ONNECTIONS
Connections that are opened to the SIP Stack are referred to as server
connections. The same stateful objects that implement client connections are
used for server connections. As with client connections, the TransportMgr
manages the server connections. In contrast to client connections, the
application cannot create server connections.