Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 31, 2011, 3:35:59 PM (14 years ago)
Author:
smerkli
Message:

Started thinking about server list cleanups

Location:
code/branches/masterserver2/src/libraries/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/masterserver2/src/libraries/network/MasterServer.cc

    r7801 r8163  
    9999  }
    100100
     101  /* maybe the two methods below can be merged into one and
     102   * made to use ENet's RTT functionality to check for disconnected
     103   * servers.
     104   */
     105  void
     106  MasterServer::helper_pingServers( void )
     107  {
     108    /* get an iterator */
     109    std::list<packet::ServerInformation>::iterator i;
     110    /* loop through list elements */
     111    for( i = mainlist.serverlist.begin(); i
     112        != mainlist.serverlist.end(); ++i )
     113    {
     114      /* to be implemented, waiting for Oli to reply to my email - sandro */
     115   
     116    }
     117 
     118  }
     119
     120  void
     121  MasterServer::helper_cleanupServers()
     122  {
     123    /* same as above. */
     124
     125  }
     126
    101127
    102128
     
    235261
    236262    /* TODO schedule pings for servers somewhere here */
     263    /* Iterate through servers and send pings */
     264    helper_pingServers();
    237265   
     266    /* check for timed out pings and remove those guys from
     267     * the server list
     268     */
     269    helper_cleanupServers();
     270
     271
    238272    /* create an iterator for the loop */
    239273    enet_host_service( this->server, event, 100 );
  • code/branches/masterserver2/src/libraries/network/MasterServer.h

    r7801 r8163  
    6969      /* helpers */
    7070      void helper_sendlist( ENetEvent *event );
     71      void helper_pingServers( void );
     72      void helper_cleanupServers();
    7173
    7274      /* members */
Note: See TracChangeset for help on using the changeset viewer.