Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 369 was 369, checked in by scheusso, 17 years ago

PacketDecoder:

Extended Class to make inheriting easier…

-added virtual function, that can be implemented by lower classes

Client:

Added some function, changed some things (input, gamestate, connectionhandling)

Server:

same as client

File size: 882 bytes
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
13#ifndef NETWORK_SERVER_H
14#define NETWORK_SERVER_H
15
16#include <string>
17
[285]18#include "ConnectionManager.h"
19#include "PacketManager.h"
[369]20#include "enet/enet.h"
[230]21
22namespace network{
[285]23
[230]24  /**
25   * This class is the root class of the network module for a server.
26   * It implements all functions necessary for a Server
27   */
28  class Server : PacketDecoder{
29    public:
30    Server();
31    Server(int port, std::string bindAddress);
32    Server(int port, const char *bindAddress);
[369]33    void open();
34    void close();
35    bool sendMSG(std::string msg);
36    bool sendMSG(const char *msg);
37    void tick();
[230]38    private:
39    ConnectionManager connection;
[369]40    GameStateManager gamestates;
41    PacketGenerator packet_gen;
[285]42
[230]43  };
[285]44
45
46
47
48
[230]49}
50
51#endif
Note: See TracBrowser for help on using the repository browser.