// (C) 2016 University of Bristol. See License.txt #include "Networking/sockets.h" #include "Networking/ServerSocket.h" #include #include #include using namespace std; vector socket_num; vector names; int nmachines; void get_name(int num) { // Now all machines are set up, send GO to start them. send(socket_num[num], GO); cerr << "Player " << num << " started." << endl; // Receive Name names[num]=new octet[512]; receive(socket_num[num],names[num],512); cerr << "Player " << num << " is on machine " << names[num] << endl; } void send_names(int num) { /* Now send the machine names back to each client * and the number of machines */ send(socket_num[num],nmachines); for (int i=0; i