Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/network/src/network/Server.h @ 888

Last change on this file since 888 was 888, checked in by scheusso, 16 years ago

sdfsdf

File size: 1.1 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 "orxonox/objects/Tickable.h"
19
20#include "PacketManager.h"
21#include "NetworkPrereqs.h"
22
23
24
25namespace network
26{
27  /**
28  * This class is the root class of the network module for a server.
29  * It implements all functions necessary for a Server
30  */
31  class _NetworkExport Server : public PacketDecoder, public orxonox::Tickable{
32  public:
33    Server();
34    Server(int port, std::string bindAddress);
35    Server(int port, const char *bindAddress);
36    void open();
37    void close();
38    bool sendMSG(std::string msg);
39    bool sendMSG(const char *msg);
40    void tick(float time);
41  protected:
42    void processQueue();
43    void updateGamestate();
44  private:
45    bool sendGameState();
46    void processAck( ack *data, int clientID);
47    ConnectionManager *connection;
48    GameStateManager *gamestates;
49    PacketGenerator packet_gen;
50
51    ClientInformation *clients;
52  };
53
54
55
56
57}
58
59#endif /* _Server_H__ */
Note: See TracBrowser for help on using the repository browser.