28 lines
770 B
C++
28 lines
770 B
C++
#pragma once
|
|
|
|
#include "Participant.h"
|
|
|
|
namespace Passer {
|
|
namespace Control {
|
|
|
|
/// @brief A participant is device which can communicate with other participants
|
|
class SiteServer : public Participant {
|
|
public:
|
|
SiteServer(int port = 7681);
|
|
|
|
virtual void Update(unsigned long currentTimeMs) override;
|
|
|
|
template <typename ThingClass> void Register(unsigned char thingType);
|
|
// template <typename ThingClass> void Register(Thing::Type thingType);
|
|
|
|
protected:
|
|
unsigned long nextPublishMe = 0;
|
|
|
|
virtual void Process(Participant *sender, ClientMsg *msg) override;
|
|
virtual void Process(Participant *sender, NetworkIdMsg *msg) override;
|
|
virtual void Process(ThingMsg *msg) override;
|
|
};
|
|
|
|
} // namespace Control
|
|
} // namespace Passer
|
|
using namespace Passer::Control; |