| 37 | |
| 38 | |
| 39 | void Server::get_name(int num) |
| 40 | { |
| 41 | if (OnlineOptions::singleton.has_option("debug_networking")) |
| 42 | cerr << "Player " << num << " started." << endl; |
| 43 | |
| 44 | // Receive name sent by client (legacy) - not used here |
| 45 | octetStream os; |
| 46 | os.Receive(socket_num[num]); |
| 47 | receive(socket_num[num],(octet*)&ports[num],4); |
| 48 | if (OnlineOptions::singleton.has_option("debug_networking")) |
| 49 | cerr << "Player " << num << " listening on " << os.str() << ":" |
| 50 | << ports[num] << endl; |
| 51 | |
| 52 | // Get client IP |
| 53 | get_ip(num); |
| 54 | } |
| 55 | |
| 56 | |
| 57 | void Server::send_names() |
no test coverage detected