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

Working with the Transport Layer 307
Server Connection Reuse
{
printf(“RvSipTransportConnectionGetRemoteAddress() failed”);
*pbDrop = RV_TRUE;
}
if (portRemote < 5000 || portRemote > 60000)
{
printf("0x%p incoming connection is DISAPPROVED by Application: remote addr
%s:%d, local addr %s:%d", hConn, strIPRemote, portRemote, strIPLocal,
portLocal);
*pbDrop = RV_TRUE;
}
return RV_OK;
}
/*===================================================================*/
SERVER
CONNECTION
R
EUSE
When using a reliable transport, SIP entities use a connection to send a request.
This connection typically originates from an ephemeral port. The SIP protocol
includes mechanisms which ensure that responses to a request reuse the existing
connection that is typically still available. The SIP protocol also includes
provisions for reusing existing client connections for other requests sent by the
originator of the connection. (For more information, see Persistent Connection
Handling). However, new requests sent in the opposite direction are unlikely to
reuse the existing connection. This frequently causes a pair of SIP entities to use
one connection for requests sent in each direction, as shown in Figure 14-3.
Figure 14-3 Double Connection between SIP Entities
The Connection Reuse feature (defined in draft-ietf-sip-connect-reuse-03)
implements a connection sharing mechanism that enables user agents (UAs) to
use incoming server connections for sending outgoing requests, so that a single
connection between two entities will be sufficient.
Entity A
Entity B
8293
5061
5061
9741