#include <src/network/ClientInformation.h>
Public Member Functions | |
void | addFailure () |
ClientInformation () | |
int | getFailures () |
unsigned int | getGamestateID () |
unsigned int | getID () |
double | getPacketLoss () |
unsigned int | getPartialGamestateID () |
ENetPeer * | getPeer () |
uint32_t | getRTT () |
unsigned int | getShipID () |
bool | getSynched () |
ClientInformation * | next () |
ClientInformation * | prev () |
void | resetFailures () |
bool | setGamestateID (int id) |
void | setID (int clientID) |
bool | setPartialGamestateID (int id) |
bool | setPeer (ENetPeer *peer) |
void | setShipID (unsigned int id) |
bool | setSynched (bool s) |
~ClientInformation () | |
Static Public Member Functions | |
static ClientInformation * | findClient (ENetAddress *address, bool look_backwards=false) |
static ClientInformation * | findClient (unsigned int clientID, bool look_backwards=false) |
static ClientInformation * | getBegin () |
static bool | hasClients () |
static ClientInformation * | insertBack (ClientInformation *ins) |
static bool | removeClient (ENetPeer *peer) |
static bool | removeClient (unsigned int clientID) |
Private Member Functions | |
ClientInformation * | insertAfter (ClientInformation *ins) |
ClientInformation * | insertBefore (ClientInformation *ins) |
bool | setNext (ClientInformation *next) |
bool | setPrev (ClientInformation *prev) |
Private Attributes | |
unsigned int | clientID_ |
unsigned short | failures_ |
unsigned int | gamestateID_ |
ClientInformation * | nexte |
unsigned int | partialGamestateID_ |
ENetPeer * | peer_ |
ClientInformation * | preve |
unsigned int | ShipID_ |
bool | synched_ |
Static Private Attributes | |
static ClientInformation * | head_ = 0 |
orxonox::ClientInformation::ClientInformation | ( | ) |
References gamestateID_, orxonox::GAMESTATEID_INITIAL, head_, nexte, partialGamestateID_, preve, and synched_.
orxonox::ClientInformation::~ClientInformation | ( | ) |
void orxonox::ClientInformation::addFailure | ( | ) |
References failures_.
ClientInformation * orxonox::ClientInformation::findClient | ( | ENetAddress * | address, | |
bool | look_backwards = false | |||
) | [static] |
ClientInformation * orxonox::ClientInformation::findClient | ( | unsigned int | clientID, | |
bool | look_backwards = false | |||
) | [static] |
This function goes forward through the list and looks for an element with clientID This function should only be applied to the head of the list
clientID | id to look for |
References getID(), head_, and next().
Referenced by orxonox::GamestateManager::ack(), orxonox::ServerConnection::addPacket(), orxonox::Server::createClient(), orxonox::packet::Packet::createPacket(), orxonox::ServerConnection::disconnectClient(), orxonox::ServerConnection::disconnectClients(), orxonox::ServerConnection::disconnectPeer(), orxonox::ServerConnection::getClientID(), orxonox::ServerConnection::getClientPeer(), orxonox::Server::getPacketLoss(), orxonox::HumanPlayer::getPacketLossRatio(), orxonox::HumanPlayer::getPing(), and orxonox::Server::getPing().
static ClientInformation* orxonox::ClientInformation::getBegin | ( | ) | [inline, static] |
Referenced by orxonox::ServerConnection::disconnectClients(), orxonox::ClientConnectionListener::getConnectedClients(), orxonox::Server::processChat(), orxonox::Server::sendChat(), orxonox::GamestateManager::sendGamestates(), orxonox::Server::sendObjectDeletes(), and orxonox::Server::updateGamestate().
int orxonox::ClientInformation::getFailures | ( | ) |
unsigned int orxonox::ClientInformation::getGamestateID | ( | ) |
References gamestateID_.
Referenced by orxonox::GamestateManager::ack(), and orxonox::GamestateManager::sendGamestates().
unsigned int orxonox::ClientInformation::getID | ( | ) |
References clientID_, and orxonox::CLIENTID_UNKNOWN.
Referenced by orxonox::Server::addClient(), orxonox::Server::createClient(), orxonox::packet::Packet::createPacket(), orxonox::Server::disconnectClient(), findClient(), orxonox::ServerConnection::getClientID(), orxonox::ClientConnectionListener::getConnectedClients(), orxonox::Server::processChat(), orxonox::GamestateManager::removeClient(), removeClient(), orxonox::Server::sendChat(), orxonox::GamestateManager::sendGamestates(), and orxonox::Server::sendObjectDeletes().
double orxonox::ClientInformation::getPacketLoss | ( | ) |
References peer_.
Referenced by orxonox::Server::getPacketLoss(), orxonox::HumanPlayer::getPacketLossRatio(), and orxonox::GamestateManager::sendGamestates().
unsigned int orxonox::ClientInformation::getPartialGamestateID | ( | ) |
References partialGamestateID_.
ENetPeer * orxonox::ClientInformation::getPeer | ( | ) |
References peer_.
Referenced by orxonox::ServerConnection::addPacket(), orxonox::ServerConnection::disconnectClient(), findClient(), orxonox::ServerConnection::getClientPeer(), and removeClient().
uint32_t orxonox::ClientInformation::getRTT | ( | ) |
References peer_.
Referenced by orxonox::HumanPlayer::getPing(), orxonox::Server::getPing(), and orxonox::GamestateManager::sendGamestates().
unsigned int orxonox::ClientInformation::getShipID | ( | ) | [inline] |
Referenced by orxonox::Server::createClient().
bool orxonox::ClientInformation::getSynched | ( | ) |
References synched_.
Referenced by orxonox::GamestateManager::sendGamestates(), and orxonox::Server::sendObjectDeletes().
static bool orxonox::ClientInformation::hasClients | ( | ) | [inline, static] |
ClientInformation * orxonox::ClientInformation::insertAfter | ( | ClientInformation * | ins | ) | [private] |
ClientInformation * orxonox::ClientInformation::insertBack | ( | ClientInformation * | ins | ) | [static] |
ClientInformation * orxonox::ClientInformation::insertBefore | ( | ClientInformation * | ins | ) | [private] |
ClientInformation * orxonox::ClientInformation::next | ( | ) |
References nexte.
Referenced by orxonox::ServerConnection::disconnectClients(), findClient(), orxonox::ClientConnectionListener::getConnectedClients(), insertAfter(), insertBack(), orxonox::Server::processChat(), removeClient(), orxonox::Server::sendChat(), orxonox::GamestateManager::sendGamestates(), orxonox::Server::sendObjectDeletes(), and ~ClientInformation().
ClientInformation * orxonox::ClientInformation::prev | ( | ) |
bool orxonox::ClientInformation::removeClient | ( | ENetPeer * | peer | ) | [static] |
bool orxonox::ClientInformation::removeClient | ( | unsigned int | clientID | ) | [static] |
References orxonox::CLIENTID_UNKNOWN, getID(), head_, and next().
void orxonox::ClientInformation::resetFailures | ( | ) |
References failures_.
bool orxonox::ClientInformation::setGamestateID | ( | int | id | ) |
void orxonox::ClientInformation::setID | ( | int | clientID | ) |
bool orxonox::ClientInformation::setNext | ( | ClientInformation * | next | ) | [private] |
References nexte.
Referenced by insertAfter(), insertBack(), insertBefore(), and ~ClientInformation().
bool orxonox::ClientInformation::setPartialGamestateID | ( | int | id | ) |
References partialGamestateID_.
bool orxonox::ClientInformation::setPeer | ( | ENetPeer * | peer | ) |
bool orxonox::ClientInformation::setPrev | ( | ClientInformation * | prev | ) | [private] |
Referenced by insertAfter(), insertBack(), insertBefore(), and ~ClientInformation().
void orxonox::ClientInformation::setShipID | ( | unsigned int | id | ) | [inline] |
bool orxonox::ClientInformation::setSynched | ( | bool | s | ) |
unsigned int orxonox::ClientInformation::clientID_ [private] |
unsigned short orxonox::ClientInformation::failures_ [private] |
Referenced by addFailure(), getFailures(), and resetFailures().
unsigned int orxonox::ClientInformation::gamestateID_ [private] |
Referenced by ClientInformation(), getGamestateID(), and setGamestateID().
ClientInformation * orxonox::ClientInformation::head_ = 0 [static, private] |
Referenced by ClientInformation(), findClient(), hasClients(), insertBack(), removeClient(), setPrev(), and ~ClientInformation().
Referenced by ClientInformation(), insertAfter(), next(), and setNext().
unsigned int orxonox::ClientInformation::partialGamestateID_ [private] |
Referenced by ClientInformation(), getPartialGamestateID(), and setPartialGamestateID().
ENetPeer* orxonox::ClientInformation::peer_ [private] |
Referenced by getPacketLoss(), getPeer(), getRTT(), and setPeer().
Referenced by ClientInformation(), insertBefore(), prev(), and setPrev().
unsigned int orxonox::ClientInformation::ShipID_ [private] |
bool orxonox::ClientInformation::synched_ [private] |
Referenced by ClientInformation(), getSynched(), and setSynched().