Fills in the passed in buffers with the info of the games that are on this subnet
| 932 | |
| 933 | // Fills in the passed in buffers with the info of the games that are on this subnet |
| 934 | int SearchForGamesPXO(uint32_t ask, uint16_t port) { |
| 935 | int count = 0; |
| 936 | int size; |
| 937 | int tries = 0; |
| 938 | uint8_t data[MAX_GAME_DATA_SIZE]; |
| 939 | network_address check_addr, from_addr; |
| 940 | check_addr.connection_type = NP_TCP; |
| 941 | if (ask) { |
| 942 | memcpy(&check_addr.address, &ask, 4); |
| 943 | check_addr.port = htons(port); |
| 944 | |
| 945 | size = START_DATA(MP_GET_PXO_GAME_INFO, data, &count); |
| 946 | MultiAddFloat(timer_GetTime(), data, &count); |
| 947 | MultiAddInt(MULTI_VERSION, data, &count); |
| 948 | END_DATA(count, data, size); |
| 949 | |
| 950 | nw_Send(&check_addr, data, count, 0); |
| 951 | |
| 952 | // Num_network_games_known=0; |
| 953 | } |
| 954 | |
| 955 | int packsize; |
| 956 | while (((packsize = nw_Receive(Multi_receive_buffer, &from_addr)) > 0)) { |
| 957 | MultiProcessBigData(Multi_receive_buffer, packsize, &from_addr); |
| 958 | } |
| 959 | return Num_network_games_known; |
| 960 | } |
| 961 | |
| 962 | #define MULTI_SERVER_TIMEOUT_TIME 40 |
| 963 | extern bool Multi_Gamelist_changed; |
nothing calls this directly
no test coverage detected