1 #ifndef _SESSIONLISTENER_H_
2 #define _SESSIONLISTENER_H_
6 #include "FileDescriptor.h"
10 namespace remote
{ namespace mcs
{
12 /** This class is responsible for opening a TCP socket and listening
13 * for new client connections (sessions).
15 class SessionListener
: public FileDescriptor
18 /** Creates and starts a new SessionListener instance.
19 * \param port Port to use when listening for new client connections.
21 SessionListener(unsigned int port
);
23 virtual ~SessionListener();
25 /** Handles a new event on the current socket
26 * \param events Event descriptor.
28 void handleEvent(short events
);
30 struct sockaddr_in server
;
31 /** Map of currently active sessions **/
32 sessionmapbyfd_t sessions
;