Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/merger/src/network/Client.h @ 297

Last change on this file since 297 was 285, checked in by nicolasc, 17 years ago

cleaned up network, builds with CML

File size: 992 bytes
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"
[229]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
[285]28 *
[229]29 */
30class Client : PacketDecoder{
31  public:
32  Client();
33  Client(std::string address, int port);
34  Client(const char *address, int port);
[285]35
[229]36  bool establishConnection();
37  bool closeConnection();
[285]38
[229]39  bool sendMouse(double x, double y);
40  bool sendKeyboard(char key_code);
[285]41
[229]42  bool addMouse(double x, double y);
43  bool addKeyboard(char key_code);
[285]44
[229]45  void update();
[285]46
[229]47  private:
48  ClientConnection client_connection;
49  PacketGenerator pck_gen;
[285]50
[229]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.