#include <src/network/ClientConnection.h>
Public Member Functions | |
bool | addPacket (ENetPacket *packet) |
ClientConnection () | |
virtual bool | closeConnection () |
virtual bool | establishConnection () |
ENetEvent * | getEvent () |
bool | isConnected () |
bool | queueEmpty () |
void | setPort (unsigned int port) |
void | setServerAddress (const std::string &serverAddress) |
virtual | ~ClientConnection () |
Private Member Functions | |
virtual void | addClient (ENetEvent *event) |
bool | disconnectConnection () |
virtual void | disconnectPeer (ENetEvent *event) |
Private Attributes | |
bool | established_ |
ENetPeer * | server_ |
ENetAddress * | serverAddress_ |
orxonox::ClientConnection::ClientConnection | ( | ) |
References orxonox::NETWORK_PORT, and serverAddress_.
orxonox::ClientConnection::~ClientConnection | ( | ) | [virtual] |
References closeConnection(), established_, and serverAddress_.
void orxonox::ClientConnection::addClient | ( | ENetEvent * | event | ) | [private, virtual] |
Implements orxonox::Connection.
bool orxonox::ClientConnection::addPacket | ( | ENetPacket * | packet | ) |
References orxonox::Connection::addPacket(), and server_.
Referenced by orxonox::Client::queuePacket().
bool orxonox::ClientConnection::closeConnection | ( | ) | [virtual] |
Reimplemented in orxonox::Client.
References COUT, established_, orxonox::Connection::host_, orxonox::NETWORK_CLIENT_CONNECTION_TIMEOUT, orxonox::NETWORK_CLIENT_WAIT_TIME, and server_.
Referenced by orxonox::Client::closeConnection(), and ~ClientConnection().
bool orxonox::ClientConnection::disconnectConnection | ( | ) | [private] |
void orxonox::ClientConnection::disconnectPeer | ( | ENetEvent * | event | ) | [private, virtual] |
bool orxonox::ClientConnection::establishConnection | ( | ) | [virtual] |
Reimplemented in orxonox::Client.
References COUT, established_, orxonox::Connection::host_, orxonox::NETWORK_CLIENT_CHANNELS, orxonox::NETWORK_CLIENT_CONNECTION_TIMEOUT, orxonox::NETWORK_CLIENT_MAX_CONNECTIONS, orxonox::NETWORK_CLIENT_WAIT_TIME, server_, and serverAddress_.
Referenced by orxonox::Client::establishConnection().
ENetEvent* orxonox::ClientConnection::getEvent | ( | ) |
bool orxonox::ClientConnection::isConnected | ( | ) | [inline] |
Referenced by orxonox::Client::update(), and orxonox::Client::~Client().
bool orxonox::ClientConnection::queueEmpty | ( | ) |
void orxonox::ClientConnection::setPort | ( | unsigned int | port | ) |
void orxonox::ClientConnection::setServerAddress | ( | const std::string & | serverAddress | ) |
bool orxonox::ClientConnection::established_ [private] |
Referenced by closeConnection(), disconnectPeer(), establishConnection(), and ~ClientConnection().
ENetPeer* orxonox::ClientConnection::server_ [private] |
Referenced by addPacket(), closeConnection(), and establishConnection().
Referenced by ClientConnection(), establishConnection(), setPort(), setServerAddress(), and ~ClientConnection().