Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/network/Client.h @ 440

Last change on this file since 440 was 438, checked in by dumenim, 16 years ago

Client got a new function send Chat

File size: 1.3 KB
RevLine 
[229]1//
2// C++ Interface: Client
3//
[285]4// Description:
[229]5//
6//
[230]7// Author:  Oliver Scheuss, (C) 2007
[229]8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12
13#ifndef NETWORK_CLIENT_H
14#define NETWORK_CLIENT_H
15
16#include <string>
17
[285]18#include "ClientConnection.h"
19#include "PacketManager.h"
[413]20#include "GameStateClient.h"
[400]21#include "orxonox/core/IdentifierIncludes.h"
[229]22
23
24namespace network{
25
26/**
27 * The network/Client class
28 * This class implements all necessary function for the network communication
29 * It is the root class of the network module
[285]30 *
[229]31 */
32class Client : PacketDecoder{
33  public:
34  Client();
35  Client(std::string address, int port);
36  Client(const char *address, int port);
[285]37
[229]38  bool establishConnection();
39  bool closeConnection();
[285]40
[229]41  bool sendMouse(double x, double y);
42  bool sendKeyboard(char key_code);
[438]43  bool sendChat( std::string message );
[285]44
[229]45  bool addMouse(double x, double y);
46  bool addKeyboard(char key_code);
[285]47
[369]48  bool sendPackets();
49 
[229]50  void update();
[285]51
[229]52  private:
53  ClientConnection client_connection;
54  PacketGenerator pck_gen;
[413]55  GameStateClient gamestate;
[229]56  bool isConnected;
[369]57 
58  // implement data processing functions of PacketDecoder
[405]59  void processGamestate( GameStateCompressed *data);
[400]60  void processClassid(classid *clid);
[425]61  void processChat( chat *data);
[229]62};
63
64}
65
66#endif
Note: See TracBrowser for help on using the repository browser.