Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/network/Server.h @ 735

Last change on this file since 735 was 673, checked in by rgrieder, 17 years ago
  • deleted obsolete classes: BaseEntity, Entity, Light and SceneNode (please complain if not agreed)
  • improved include guard naming consistency
File size: 1.2 KB
Line 
1//
2// C++ Interface: Server
3//
4// Description:
5//
6//
7// Author:  Oliver Scheuss, (C) 2007
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12
13#ifndef _Server_H__
14#define _Server_H__
15
16#include <string>
17
18#include "ConnectionManager.h"
19#include "PacketManager.h"
20#include "PacketTypes.h"
21#include "GameStateManager.h"
22#include "ClientInformation.h"
23//#include "enet/enet.h"
24//#include "NetworkFrameListener.h"
25
26
27namespace network{
28
29 
30  /**
31   * This class is the root class of the network module for a server.
32   * It implements all functions necessary for a Server
33   */
34  class Server : public PacketDecoder{
35    public:
36    Server();
37    Server(int port, std::string bindAddress);
38    Server(int port, const char *bindAddress);
39    void open();
40    void close();
41    bool sendMSG(std::string msg);
42    bool sendMSG(const char *msg);
43    void tick(float time);
44    protected:
45    void processQueue();
46    void updateGamestate();
47    private:
48    bool sendGameState();
49    void processAck( ack *data, int clientID);
50    ConnectionManager *connection;
51    GameStateManager *gamestates;
52    PacketGenerator packet_gen;
53   
54    ClientInformation *clients;
55  };
56 
57
58
59
60}
61
62#endif /* _Server_H__ */
Note: See TracBrowser for help on using the repository browser.