|
@@ -93,9 +93,9 @@ int main(int argc, char* argv[])
|
|
|
|
|
|
cout << "[ORC] Starting BGN dealer server." << endl;
|
|
|
|
|
|
- vector<thread> serverStartup, clientStartup;
|
|
|
+ vector<thread> serverStartup, clientStartup, clientReady;
|
|
|
serverStartup.push_back(thread(start_remote_actor, targeter[dealerIP], true, "d", output, lambda, maliciousServers));
|
|
|
- this_thread::sleep_for(ONE_SECOND);
|
|
|
+ this_thread::sleep_for(HALF_SECOND);
|
|
|
|
|
|
cout << "[ORC] Starting other servers." << endl;
|
|
|
|
|
@@ -119,16 +119,24 @@ int main(int argc, char* argv[])
|
|
|
for (size_t i = 0; i < numClients; i++)
|
|
|
{
|
|
|
clientStartup.push_back(thread(start_remote_actor, targeter[clientIPs[i]], false, "c" + to_string(i), output, lambda, maliciousServers));
|
|
|
- this_thread::sleep_for(ONE_SECOND);
|
|
|
+ this_thread::sleep_for(HALF_SECOND);
|
|
|
}
|
|
|
|
|
|
- cout << "[ORC] Waiting for confirmation that servers have all clients logged." << endl;
|
|
|
+ cout << "[ORC] Waiting for confirmation that servers have all clients logged." << endl;
|
|
|
|
|
|
for (size_t i = 0; i < numClients; i++)
|
|
|
clientStartup[i].join();
|
|
|
|
|
|
wait_for_clients_created(dealerIP, dealerPort, numClients);
|
|
|
|
|
|
+ cout << "[ORC] Waiting for confirmation that clients are ready to continue." << endl;
|
|
|
+
|
|
|
+ for (size_t i = 0; i < numClients; i++)
|
|
|
+ clientReady.push_back(thread(wait_for_client_ready, clientIPs[i], clientPorts[i]));
|
|
|
+
|
|
|
+ for (size_t i = 0; i < numClients; i++)
|
|
|
+ clientReady[i].join();
|
|
|
+
|
|
|
/*
|
|
|
* MAIN ORCHESTRATOR LOOP CODE
|
|
|
*/
|