Add login.initialize function

This commit is contained in:
2024-02-27 17:32:08 -05:00
parent 2b426eefeb
commit 32dae0df5a
5 changed files with 40 additions and 79 deletions

View File

@@ -43,7 +43,7 @@ public:
master_->update_source(srcpk);
// Create an actor for administrative commands.
admin_id_ = master_->create_login_actor();
admin_id_ = master_->create_login_actor(true);
// TODO: initialize the admin actor.
@@ -208,7 +208,7 @@ public:
if (chan == nullptr) break;
if (chan->port() == 8085) {
Client *client = new Client;
client->actor_id_ = master_->create_login_actor();
client->actor_id_ = master_->create_login_actor(true);
// TODO: initialize the login actor on the master.
client->channel_ = std::move(chan);
client->async_diff_ = true;
@@ -216,7 +216,7 @@ public:
client->sync_.reset(new World(WORLD_TYPE_PREDICTIVE));
// This login actor is never used, it is just to preserve the invariant that
// the client model and the server synchronous model are identical.
client->sync_->create_login_actor();
client->sync_->create_login_actor(false);
clients_.emplace_back(client);
stdostream() << "New client: actor id=" << client->actor_id_ << std::endl;
} else if (chan->port() == 8080) {