26 lines
574 B
C++
26 lines
574 B
C++
#ifndef DISPATCHERSERVER_H
|
|
#define DISPATCHERSERVER_H
|
|
|
|
#include "cloudserver.h"
|
|
|
|
|
|
class DispatcherServer: public PIObject {
|
|
PIOBJECT(DispatcherServer)
|
|
public:
|
|
DispatcherServer(PIEthernet::Address addr);
|
|
~DispatcherServer();
|
|
EVENT_HANDLER0(void, printStatus);
|
|
|
|
private:
|
|
EVENT_HANDLER1(void, newConnection, PIEthernet * , cl);
|
|
EVENT_HANDLER1(void, disconnectClient, DispatcherClient *, client);
|
|
|
|
PIEthernet eth;
|
|
PIVector<DispatcherClient*> clients;
|
|
PIMap<PIString, CloudServer *> c_servers;
|
|
PITimer status_timer;
|
|
PIMutex map_mutex;
|
|
};
|
|
|
|
#endif // DISPATCHERSERVER_H
|