2021-10-14 15:51:38 -04:00
|
|
|
#include "lpxserver.hpp"
|
|
|
|
|
|
|
|
|
|
#include "world.hpp"
|
|
|
|
|
#include "drivenengine.hpp"
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
class ServerClient {
|
|
|
|
|
public:
|
|
|
|
|
int64_t actor_id_;
|
|
|
|
|
Channel *channel_;
|
2021-10-15 13:51:32 -04:00
|
|
|
UniqueWorld sync_;
|
2021-10-14 15:51:38 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class LpxServer : public DrivenEngine {
|
|
|
|
|
public:
|
2021-10-15 13:51:32 -04:00
|
|
|
UniqueWorld master_;
|
2021-10-14 15:51:38 -04:00
|
|
|
std::vector<std::unique_ptr<ServerClient>> clients_;
|
|
|
|
|
|
|
|
|
|
public:
|
2021-10-14 16:41:24 -04:00
|
|
|
virtual void event_init(int argc, char *argv[]) {
|
2021-10-14 15:51:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void event_update() {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
UniqueDrivenEngine make_LpxServer() {
|
|
|
|
|
return UniqueDrivenEngine(new LpxServer);
|
|
|
|
|
}
|
|
|
|
|
|