orxonox::Client Class Reference

#include <src/network/Client.h>

Inheritance diagram for orxonox::Client:

orxonox::Host orxonox::ClientConnection orxonox::Connection

List of all members.

Public Member Functions

virtual bool broadcast (const std::string &message)
virtual bool chat (const std::string &message)
 Client (const std::string &address, int port)
 Client ()
bool closeConnection ()
bool establishConnection ()
bool processChat (const std::string &message, unsigned int playerID)
bool queuePacket (ENetPacket *packet, int clientID)
void update (const Clock &time)
 ~Client ()

Private Member Functions

 Client (const Client &copy)
virtual bool isServer_ ()

Private Attributes

GamestateClient gamestate
bool gameStateFailure_
bool isSynched_
float timeSinceLastUpdate_


Detailed Description

Client *client; The network/Client class This class implements all necessary function for the network communication It is the root class of the network module

Constructor & Destructor Documentation

orxonox::Client::Client (  ) 

Constructor for the Client class initializes the address and the port to default localhost:NETWORK_PORT

orxonox::Client::Client ( const std::string address,
int  port 
)

Constructor for the Client class

Parameters:
address the server address
port port of the application on the server

References orxonox::ClientConnection::setPort(), and orxonox::ClientConnection::setServerAddress().

orxonox::Client::~Client (  ) 

orxonox::Client::Client ( const Client copy  )  [private]


Member Function Documentation

virtual bool orxonox::Client::broadcast ( const std::string message  )  [inline, virtual]

Implements orxonox::Host.

bool orxonox::Client::chat ( const std::string message  )  [virtual]

This function implements the method of sending a chat message to the server

Parameters:
message message to be sent
Returns:
result(true/false)

Implements orxonox::Host.

References orxonox::packet::Type::Chat, orxonox::Host::getPlayerID(), and orxonox::packet::Packet::send().

bool orxonox::Client::closeConnection (  )  [virtual]

closes the Connection to the Server

Returns:
true/false

Reimplemented from orxonox::ClientConnection.

References orxonox::ClientConnection::closeConnection().

Referenced by orxonox::GSClient::deactivate(), and ~Client().

bool orxonox::Client::establishConnection (  )  [virtual]

virtual bool orxonox::Client::isServer_ (  )  [inline, private, virtual]

Implements orxonox::Host.

bool orxonox::Client::processChat ( const std::string message,
unsigned int  playerID 
) [virtual]

Implements orxonox::Host.

bool orxonox::Client::queuePacket ( ENetPacket packet,
int  clientID 
) [virtual]

void orxonox::Client::update ( const Clock time  ) 


Member Data Documentation

Referenced by update().

Referenced by update().

Referenced by update().


The documentation for this class was generated from the following files:

Generated on Tue Jul 28 16:22:23 2009 for Orxonox by  doxygen 1.5.6