MNRTSPSessionFactory Class Reference
#include <MNRTSPSessionFactory.h>
Collaboration diagram for MNRTSPSessionFactory:
[legend]List of all members.
Detailed Description
The class is responsible for the creation and storage of server sessions. This class assigns session ids to sessions, to be used in RTSP's session identifier. The sessions are stored in internal tables of the factory and can be identified later by their session id. This is typically the case when an RTSP message arrives.
A secondary means to identify a session is through its socket descriptor (fd). This secondary means is necessary to allow the implicit teardown of a session if the remote host has simply closed the connection (e.g. due to a crash, incorrect implementation etc) and no teardown message is sent from the other side.
It would be intuitive to store the session by socket alone. Unfortunately, this is a bit difficult because we want to have multiplexing capabilities. This is not an exclusion criterion. But additionally, we want to keep the session id an integer, although the RTSP RFC does not demand this. However, some clients require integer session ids (we had this bug as well). We may decide to change this behaviour or make it optional, and use literals as session identifiers.
Constructor & Destructor Documentation
MNRTSPSessionFactory::MNRTSPSessionFactory |
( |
|
) |
|
|
Member Function Documentation
|
Find a session by requested filename. This function is used in optimized multicast operations, to find out whether a file is already in transfer, and whether a new client can be requested to join the session. |
|
Find a session by its session id. This is the standard case in unoptimized unicast operation. |
void MNRTSPSessionFactory::forgetSession |
( |
int |
sessionId |
) |
|
|
|
Remove a session from the list that performs a correct teardown and that has provided a valid session id. |
void MNRTSPSessionFactory::forgetSessionsBySocket |
( |
int |
fd |
) |
|
|
|
Delete all sessions that were multiplexed onto an RTSP socket that was closed. |
bool MNRTSPSessionFactory::hasMulticastSession |
( |
const MNString & |
name |
) |
|
|
|
Simpler form for findSession.
|
bool MNRTSPSessionFactory::hasSession |
( |
const MNString & |
name |
) |
|
|
|
Simpler form for findSession.
|
bool MNRTSPSessionFactory::hasSession |
( |
int |
sessionId |
) |
|
|
|
Simpler form for findSession.
|
|
Create a new session for access to the file(s) that are identified by the given initialPath. Keep the RTSP socket description for an possible implicit teardown operation. |
The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:36:02 2005 for Komssys by
1.3.8