src/network/network_udp.cpp
branchcpp_gui
changeset 6268 4b5241e5dd10
parent 6169 31cdbb4845f1
child 6285 187e3ef04cc9
equal deleted inserted replaced
6267:7c8ec33959b1 6268:4b5241e5dd10
     1 /* $Id$ */
     1 /* $Id$ */
       
     2 
       
     3 /**
       
     4  * @file network_udp.cpp This file handles the UDP related communication.
       
     5  *
       
     6  * This is the GameServer <-> MasterServer and GameServer <-> GameClient
       
     7  * communication before the game is being joined.
       
     8  */
     2 
     9 
     3 #ifdef ENABLE_NETWORK
    10 #ifdef ENABLE_NETWORK
     4 
    11 
     5 #include "../stdafx.h"
    12 #include "../stdafx.h"
     6 #include "../debug.h"
    13 #include "../debug.h"
    12 #include "network_udp.h"
    19 #include "network_udp.h"
    13 #include "../variables.h"
    20 #include "../variables.h"
    14 #include "../newgrf_config.h"
    21 #include "../newgrf_config.h"
    15 
    22 
    16 #include "core/udp.h"
    23 #include "core/udp.h"
    17 
       
    18 /**
       
    19  * @file network_udp.c This file handles the UDP related communication.
       
    20  *
       
    21  * This is the GameServer <-> MasterServer and GameServer <-> GameClient
       
    22  * communication before the game is being joined.
       
    23  */
       
    24 
    24 
    25 enum {
    25 enum {
    26 	ADVERTISE_NORMAL_INTERVAL = 30000, // interval between advertising in ticks (15 minutes)
    26 	ADVERTISE_NORMAL_INTERVAL = 30000, // interval between advertising in ticks (15 minutes)
    27 	ADVERTISE_RETRY_INTERVAL  =   300, // readvertise when no response after this many ticks (9 seconds)
    27 	ADVERTISE_RETRY_INTERVAL  =   300, // readvertise when no response after this many ticks (9 seconds)
    28 	ADVERTISE_RETRY_TIMES     =     3  // give up readvertising after this much failed retries
    28 	ADVERTISE_RETRY_TIMES     =     3  // give up readvertising after this much failed retries