Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 20, 2009, 7:21:46 PM (15 years ago)
Author:
scheusso
Message:

cleaned up server connection handling
client is yet to come

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp5/src/network/Server.h

    r3084 r3201  
    3535
    3636#include "Host.h"
     37#include "ServerConnection.h"
    3738#include "GamestateManager.h"
    3839
     
    4445  * It implements all functions necessary for a Server
    4546  */
    46   class _NetworkExport Server : public Host{
     47  class _NetworkExport Server : public Host, public ServerConnection{
    4748  public:
    4849    Server();
    4950    Server(int port);
    5051    Server(int port, const std::string& bindAddress);
    51     Server(int port, const char *bindAddress);
    5252    ~Server();
    5353
     
    6060    double getPacketLoss(unsigned int clientID);
    6161  protected:
    62     void processQueue();
    6362    void updateGamestate();
    6463  private:
     
    6766    unsigned int playerID(){return 0;}
    6867
    69     bool addClient(ENetEvent *event);
     68    void addClient(ENetEvent *event);
    7069    bool createClient(int clientID);
    71     bool disconnectClient(ENetEvent *event);
    72     void disconnectClient(int clientID);
    7370    void disconnectClient( ClientInformation *client);
    7471    bool processPacket( ENetPacket *packet, ENetPeer *peer );
     
    7875    virtual bool broadcast(const std::string& message);
    7976    bool sendChat(const std::string& message, unsigned int clientID);
     77    void syncClassid(unsigned int clientID);
    8078
    81     //void processChat( chat *data, int clientId);
    82     ConnectionManager *connection;
    8379    GamestateManager *gamestates_;
    8480
Note: See TracChangeset for help on using the changeset viewer.