HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Working with the Transport Layer 303
Server Connections
Generally, server connections should be closed by the party that initiated the
connection. It is highly recommended not to terminate server connections from
the application to prevent unexpected interruptions in message reception and
sending flow.
Most server connections are not reusable and are not inserted into the
connection hash. (For an exception to this, see Server Connection Reuse.)
However, a transaction that uses a server connection becomes the connection
owner. Since several messages can be sent on a single server connection, a
server connection can be owned by several transactions. When a server
transaction terminates, it detaches from the server connection.
SERVER CONNECTION
API
Since the same objects implement server and client connections, both have the
same parameters and API functions for parameter inspection and modification.
For more information, see Working with Connections.
Note that some of the Control and Set API functions of the connection are
irrelevant for server connections, such as RvSipTransportConnectionConnect().
SERVER CONNECTION
EVENTS
The TransportMgr provides several events regarding a server connection in the
form of callback functions for server connection control. To get the events, the
application should register to the corresponding callbacks after SIP Stack
initialization by calling the RvSipTransportMgrSetEvHandlers() function.
The following events are supplied with the Transport Manager API:
RvSipTransportConnectionCreatedEv()
Notifies application about the creation of a server connection, as a result of
accepting an incoming connection. This callback supplies a handle to the server
connection. Additional information about the connection, such as the remote
address, can be obtained by the Connection API. Using an OUT parameter, the
application can order the SIP Stack to drop the connection immediately before
the SIP Stack will process any data that was received on the connection.