Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 963 was 918, checked in by rgrieder, 16 years ago
  • created basic construct for the InputHandler (mere copy of InputManager but without the Listeners)
  • some msvc related fixes with winsocks.h and winsocks2.h
  • fix in Tickable.h (due to lazy displacement to new folder)
File size: 1.1 KB
RevLine 
[230]1//
2// C++ Interface: Server
3//
[285]4// Description:
[230]5//
6//
7// Author:  Oliver Scheuss, (C) 2007
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12
[673]13#ifndef _Server_H__
14#define _Server_H__
[230]15
16#include <string>
17
[918]18#include "NetworkPrereqs.h"
19
[917]20#include "core/Tickable.h"
[285]21#include "PacketManager.h"
[230]22
[888]23
24
[777]25namespace network
26{
[230]27  /**
[777]28  * This class is the root class of the network module for a server.
29  * It implements all functions necessary for a Server
30  */
[888]31  class _NetworkExport Server : public PacketDecoder, public orxonox::Tickable{
[777]32  public:
[230]33    Server();
34    Server(int port, std::string bindAddress);
35    Server(int port, const char *bindAddress);
[369]36    void open();
37    void close();
38    bool sendMSG(std::string msg);
39    bool sendMSG(const char *msg);
[459]40    void tick(float time);
[777]41  protected:
[440]42    void processQueue();
43    void updateGamestate();
[777]44  private:
[422]45    bool sendGameState();
[620]46    void processAck( ack *data, int clientID);
[436]47    ConnectionManager *connection;
48    GameStateManager *gamestates;
[369]49    PacketGenerator packet_gen;
[777]50
[436]51    ClientInformation *clients;
[230]52  };
[285]53
54
55
[777]56
[230]57}
58
[673]59#endif /* _Server_H__ */
Note: See TracBrowser for help on using the repository browser.