Client can now connect to servers interactively
This commit is contained in:
@@ -41,6 +41,8 @@ public:
|
||||
// Create an actor for administrative commands.
|
||||
admin_id_ = master_->create_login_actor();
|
||||
|
||||
// TODO: initialize the admin actor.
|
||||
|
||||
// Print out admin ID for debugging purposes.
|
||||
stdostream() << "Admin actor id = " << admin_id_ << std::endl;
|
||||
|
||||
@@ -196,8 +198,11 @@ public:
|
||||
if (chan->port() == 8085) {
|
||||
Client *client = new Client;
|
||||
client->actor_id_ = master_->create_login_actor();
|
||||
// TODO: initialize the login actor on the master.
|
||||
client->channel_ = std::move(chan);
|
||||
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();
|
||||
clients_.emplace_back(client);
|
||||
stdostream() << "New client: actor id=" << client->actor_id_ << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user