Fills in the passed in buffers with the info of the games that are on this subnet
| 903 | #define GET_GAME_INFO_TIME 2 |
| 904 | // Fills in the passed in buffers with the info of the games that are on this subnet |
| 905 | int SearchForLocalGamesTCP(uint32_t ask, uint16_t port) { |
| 906 | int count = 0; |
| 907 | int size; |
| 908 | int tries = 0; |
| 909 | uint8_t data[MAX_GAME_DATA_SIZE]; |
| 910 | network_address check_addr, from_addr; |
| 911 | check_addr.connection_type = NP_TCP; |
| 912 | if (ask) { |
| 913 | memcpy(&check_addr.address, &ask, 4); |
| 914 | check_addr.port = htons(port); |
| 915 | |
| 916 | size = START_DATA(MP_GET_GAME_INFO, data, &count); |
| 917 | MultiAddFloat(timer_GetTime(), data, &count); |
| 918 | MultiAddInt(MULTI_VERSION, data, &count); |
| 919 | END_DATA(count, data, size); |
| 920 | |
| 921 | nw_Send(&check_addr, data, count, 0); |
| 922 | |
| 923 | // Num_network_games_known=0; |
| 924 | } |
| 925 | |
| 926 | int packsize; |
| 927 | while (((packsize = nw_Receive(Multi_receive_buffer, &from_addr)) > 0)) { |
| 928 | MultiProcessBigData(Multi_receive_buffer, packsize, &from_addr); |
| 929 | } |
| 930 | return Num_network_games_known; |
| 931 | } |
| 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) { |
nothing calls this directly
no test coverage detected