Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 12, 2008, 7:40:47 PM (16 years ago)
Author:
scheusso
Message:

merged network branch back to trunk

File:
1 edited

Legend:

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

    r1751 r1907  
    3737
    3838/**
    39         @author Oliver Scheuss
     39*       @brief Base class of Server and Client
     40*       This is the Base class of the Server and Client classes
     41*       - Makes server and client a singleton
     42*       - defines static functions available on both server and client
     43*       - is the interface to be used when communicating with the network
     44*       @author Oliver Scheuss
    4045*/
    4146class Host{
     
    4550    //virtual bool sendChat(packet::Chat *chat)=0;
    4651    virtual bool queuePacket(ENetPacket *packet, int clientID)=0;
    47     virtual unsigned int shipID()=0;
    48     virtual int playerID()=0;
     52    virtual bool chat(std::string message)=0;
     53    virtual bool processChat(std::string message, unsigned int playerID)=0;
     54    virtual bool isServer_()=0;
    4955
    5056
     
    5460    virtual ~Host();
    5561    static Host *instance_;
    56     bool isServer_;     
     62    unsigned int clientID_;
     63    unsigned int shipID_;
    5764
    5865  public:
     
    6168    //static bool chat(std::string& message);
    6269//     static bool receiveChat(packet::Chat *message, unsigned int clientID);
    63     static int getPlayerID();
     70    static unsigned int getPlayerID();
    6471    static unsigned int getShipID(){return instance_->shipID_;}
    6572    static void setClientID(unsigned int id){ instance_->clientID_ = id; }
    6673    static void setShipID(unsigned int id){ instance_->shipID_ = id; }
    67     static bool isServer(){ return instance_->isServer_; }             
     74    static bool isServer(){ return instance_->isServer_(); }           
     75    static bool Chat(std::string message);
     76    static bool incomingChat(std::string message, unsigned int playerID);
    6877  private:
    69     unsigned int clientID_;
    70     unsigned int shipID_;
    7178};
    7279
Note: See TracChangeset for help on using the changeset viewer.