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