Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 28, 2009, 3:04:30 PM (15 years ago)
Author:
scheusso
Message:

a lot of cleanup
some bugfixes (Thread, ThreadPool)
the biggest part of the network (~80% cpu time) is now multithreaded (1 thread for each client)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp6/src/network/GamestateManager.h

    r3214 r3240  
    4545#include <map>
    4646#include "GamestateHandler.h"
     47#include "core/CorePrereqs.h"
    4748
    4849namespace orxonox
     
    7374    bool processGamestates();
    7475    bool update();
    75     packet::Gamestate *popGameState(unsigned int clientID);
     76    void sendGamestates();
     77//     packet::Gamestate *popGameState(unsigned int clientID);
     78    void finishGamestate( unsigned int clientID, packet::Gamestate** destgamestate, packet::Gamestate* base, packet::Gamestate* gamestate );
    7679
    7780    bool getSnapshot();
     
    7982    bool ack(unsigned int gamestateID, unsigned int clientID);
    8083    void removeClient(ClientInformation *client);
    81     private:
     84  private:
    8285    bool processGamestate(packet::Gamestate *gs);
    8386
    8487    std::map<unsigned int, std::map<unsigned int, packet::Gamestate*> > gamestateMap_;
    85     //std::map<int, packet::Gamestate*> gamestateMap; //map gsID to gamestate*
    86     //std::map<int, int> gamestateUsed; // save the number of clients, that use the specific gamestate
    8788    std::map<unsigned int, packet::Gamestate*> gamestateQueue;
    8889    packet::Gamestate *reference;
    8990    TrafficControl *trafficControl_;
    9091    unsigned int id_;
     92    boost::mutex* threadMutex_;
     93    ThreadPool*   threadPool_;
    9194  };
    9295
Note: See TracChangeset for help on using the changeset viewer.