1 void poll_network() {
 2     Connection *player;
 3     int recv_bytes;
 4     char recv_buffer[255];
 5     char from_ip[255];
 6     int from_port;
 7 
 8     recv_bytes = recv_with_socket(server, recv_buffer, sizeof(recv_buffer), from_ip, &from_port);
 9 
10     if (recv_bytes == -1) {
11         return;
12     }
13 
14     player = find_player_by_address(from_ip, from_port);
15 
16     if (player) {
17         bootstrap_player_command(player, recv_buffer);
18     } else {
19         accept_connection(from_ip, from_port);
20     }
21 }