Add LpxClient/LpxServer stubs, add dispatcher to main

This commit is contained in:
2021-10-14 15:51:38 -04:00
parent 901517bc01
commit a9afbebbc3
11 changed files with 315 additions and 152 deletions

View File

@@ -0,0 +1,30 @@
#include "lpxserver.hpp"
#include "world.hpp"
#include "drivenengine.hpp"
#include <memory>
class ServerClient {
public:
int64_t actor_id_;
Channel *channel_;
std::unique_ptr<World> sync_;
};
class LpxServer : public DrivenEngine {
public:
std::unique_ptr<World> master_;
std::vector<std::unique_ptr<ServerClient>> clients_;
public:
virtual void event_init() {
}
virtual void event_update() {
}
};
UniqueDrivenEngine make_LpxServer() {
return UniqueDrivenEngine(new LpxServer);
}