Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/network/src/network/Client.h @ 229

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

added class Client (rootclass of the network module for the client) and modified makefile

File size: 1010 bytes
Line 
1//
2// C++ Interface: Client
3//
4// Description:
5//
6//
7// Author:  <>, (C) 2007
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
18#include "network/ClientConnection.h"
19#include "network/PacketManager.h"
20
21
22namespace network{
23
24/**
25 * The network/Client class
26 * This class implements all necessary function for the network communication
27 * It is the root class of the network module
28 *
29 */
30class Client : PacketDecoder{
31  public:
32  Client();
33  Client(std::string address, int port);
34  Client(const char *address, int port);
35 
36  bool establishConnection();
37  bool closeConnection();
38 
39  bool sendMouse(double x, double y);
40  bool sendKeyboard(char key_code);
41 
42  bool addMouse(double x, double y);
43  bool addKeyboard(char key_code);
44 
45  void update();
46 
47  private:
48  ClientConnection client_connection;
49  PacketGenerator pck_gen;
50 
51  //const char *server_address;
52  //int port;
53  bool isConnected;
54};
55
56}
57
58#endif
Note: See TracBrowser for help on using the repository browser.