static int fs2netd_connect_do() { int retval = FS2NetD_ConnectToServer(Multi_options_g.game_tracker_ip, Multi_options_g.tracker_port); Sleep(5); switch (retval) { // connection failed case -1: Is_connected = false; return 2; // still trying to connect case 0: return 0; // connected! case 1: Is_connected = true; return 1; } return 0; }
static int fs2netd_connect_do() { int retval = FS2NetD_ConnectToServer(PXO_Server, PXO_port); Sleep(5); switch (retval) { // connection failed case -1: Is_connected = false; return 2; // still trying to connect case 0: return 0; // connected! case 1: Is_connected = true; return 1; } return 0; }