remote_game_client.hpp 699 Bytes
Newer Older
1 2 3 4 5 6 7 8
/**
 * @class RemoteGameClient
 */


#ifndef __REMOTE_GAME_CLIENT_HPP__
# define __REMOTE_GAME_CLIENT_HPP__

9
#include <functional>
10
#include <network/remote_client_base.hpp>
louiz’'s avatar
louiz’ committed
11
#include <network/tcp_socket.hpp>
12

louiz’'s avatar
louiz’ committed
13
class GameServer;
14

louiz’'s avatar
louiz’ committed
15
class RemoteGameClient: public RemoteClientBase<TCPSocket>
16 17
{
public:
18
  RemoteGameClient();
19
  ~RemoteGameClient();
louiz’'s avatar
louiz’ committed
20 21
  void on_connection_closed() override final;
  void set_game_server(GameServer* server);
22 23 24 25 26 27 28

private:
  /**
   * Creates the default callbacks associated with a network command.
   * It is executed whenever that command is received.
   * See CommandHandler for details
   */
louiz’'s avatar
louiz’ committed
29 30 31
  void install_callbacks() override final;

  GameServer* server;
32 33 34 35
};

#endif
/**@}*/