Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1785


Ignore:
Timestamp:
Sep 15, 2008, 10:59:54 AM (16 years ago)
Author:
rgrieder
Message:

replaced the macro constants with c++'s idea of constants in network library.

Location:
code/trunk/src/network
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/network/ClientConnection.h

    r1755 r1785  
    5353{
    5454
    55 #define NETWORK_PORT 55556
    56 #define NETWORK_CLIENT_MAX_CONNECTIONS 5
    57 #define NETWORK_CLIENT_WAIT_TIME 1
    58 #define NETWORK_CLIENT_CONNECT_TIMEOUT 3000 // miliseconds
    59 #define NETWORK_CLIENT_CHANNELS 2
     55    const int NETWORK_PORT = 55556;
     56    const int NETWORK_CLIENT_MAX_CONNECTIONS = 5;
     57    const int NETWORK_CLIENT_WAIT_TIME = 1;
     58    const int NETWORK_CLIENT_CONNECT_TIMEOUT = 3000; // miliseconds
     59    const int NETWORK_CLIENT_CHANNELS = 2;
    6060
    6161
  • code/trunk/src/network/ConnectionManager.h

    r1755 r1785  
    6161namespace network
    6262{
    63 #define NETWORK_PORT 55556
    64 #define NETWORK_MAX_CONNECTIONS 50
    65 #define NETWORK_WAIT_TIMEOUT 1
    66 #define NETWORK_DEFAULT_CHANNEL 0
     63    const int NETWORK_PORT = 55556;
     64    const int NETWORK_MAX_CONNECTIONS = 50;
     65    const int NETWORK_WAIT_TIMEOUT = 1;
     66    const int NETWORK_DEFAULT_CHANNEL = 0;
    6767
    6868  struct ClientList{
  • code/trunk/src/network/GamestateManager.h

    r1763 r1785  
    5050{
    5151
    52 #define KEEP_GAMESTATES 10
     52    const int KEEP_GAMESTATES = 10;
    5353
    5454  /**
  • code/trunk/src/network/Server.cc

    r1755 r1785  
    6060namespace network
    6161{
    62   #define MAX_FAILURES 20;
    63   #define NETWORK_FREQUENCY 30
     62  const int MAX_FAILURES = 20;
     63  const int NETWORK_FREQUENCY = 30;
    6464
    6565  /**
  • code/trunk/src/network/Server.h

    r1735 r1785  
    5151namespace network
    5252{
    53   #define CLIENTID_SERVER 0
     53  const int CLIENTID_SERVER = 0;
    5454 
    5555  /**
Note: See TracChangeset for help on using the changeset viewer.