Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 4, 2008, 8:53:10 PM (16 years ago)
Author:
rgrieder
Message:

merged network branch back to trunk

File:
1 edited

Legend:

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

    r1505 r1534  
    5353namespace network
    5454{
     55  #define CLIENTID_SERVER 0
     56 
    5557  /**
    5658  * This class is the root class of the network module for a server.
     
    5961  class _NetworkExport Server : public PacketDecoder, public orxonox::Tickable{
    6062  public:
    61     Server();
    62     Server(int port);
    63     Server(int port, std::string bindAddress);
    64     Server(int port, const char *bindAddress);
     63    static Server *createSingleton();
     64    static Server *createSingleton(int port);
     65    static Server *createSingleton(int port, std::string bindAddress);
     66    static Server *createSingleton(int port, const char *bindAddress);
     67   
     68    static Server *getSingleton();
     69   
    6570    void open();
    6671    void close();
    67     bool sendMSG(std::string msg);
    68     bool sendMSG(const char *msg);
     72    bool sendChat(std::string msg);
     73    bool sendChat(const char *msg);
    6974    void tick(float time);
    7075  protected:
     
    7277    void updateGamestate();
    7378  private:
     79    Server();
     80    Server(int port);
     81    Server(int port, std::string bindAddress);
     82    Server(int port, const char *bindAddress);
     83   
     84    static Server *instance_;
     85   
    7486    bool addClient(ENetEvent *event);
    7587    bool createClient(int clientID);
     
    8294    bool processConnectRequest( connectRequest *con, int clientID );
    8395    void processGamestate( GameStateCompressed *data, int clientID);
     96    void processChat( chat *data, int clientId);
    8497    ConnectionManager *connection;
    8598    GameStateManager *gamestates;
Note: See TracChangeset for help on using the changeset viewer.