|
Orxonox
0.0.5 Codename: Arcturus
|
Base class of Server and Client This is the Base class of the Server and Client classes. More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/network/Host.h>
Public Member Functions | |
| bool | isActive () |
| virtual void | printRTT ()=0 |
Public Member Functions inherited from orxonox::GamestateManager | |
| GamestateManager () | |
| ~GamestateManager () | |
| virtual bool | ackGamestate (unsigned int gamestateID, unsigned int peerID) override |
| Acknowledge a received gamestate. More... | |
| virtual bool | addGamestate (packet::Gamestate *gs, unsigned int peerID) override |
| void | addPeer (uint32_t peerID) |
| Add a peer to the game. More... | |
| void | finishGamestate (unsigned int peerID, packet::Gamestate *&destgamestate, packet::Gamestate *base, packet::Gamestate *gamestate) |
| virtual uint32_t | getCurrentGamestateID () override |
| std::vector< packet::Gamestate * > | getGamestates () |
| Return a vector with the gamestates of all peers. More... | |
| virtual uint32_t | getLastReceivedGamestateID (unsigned int peerID) override |
| Return the ID of the last received gamestate for a certain peer. More... | |
| bool | getSnapshot () |
| Update the current gamestate. More... | |
| bool | hasPeers () |
| bool | processGamestates () |
| Process the queued gamestates. More... | |
| void | removePeer (uint32_t peerID) |
| Remove a peer from the game. More... | |
| bool | sendAck (unsigned int gamestateID, uint32_t peerID) |
| Send Acknowledgement packet. More... | |
| void | setSynched (uint32_t peerID) |
| bool | update () |
Static Public Member Functions | |
| static void | addPacket (ENetPacket *packet, int clientID=NETWORK_PEER_ID_SERVER, uint8_t channelID=0) |
| This function is used to add an enetpacket to be sent to another peer. More... | |
| static Host * | getActiveInstance () |
| Singleton implementation. More... | |
| static unsigned int | getPlayerID () |
| static bool | isServer () |
| static bool | running () |
| static void | sendChat (const std::string &message, unsigned int sourceID, unsigned int targetID) |
| Sends a chat message through the network. More... | |
| static void | setClientID (unsigned int id) |
Protected Member Functions | |
| Host () | |
| Constructor: assures that only one reference will be created and sets the pointer. More... | |
| virtual | ~Host () |
| Destructor: resets the instance pointer to nullptr. More... | |
| virtual void | doReceiveChat (const std::string &message, unsigned int sourceID, unsigned int targetID)=0 |
| Gets called if a packet::Chat packet is received. More... | |
| virtual void | doSendChat (const std::string &message, unsigned int sourceID, unsigned int targetID)=0 |
| void | setActive (bool bActive) |
Protected Member Functions inherited from orxonox::GamestateManager | |
| virtual bool | sendPacket (packet::Packet *packet)=0 |
Protected Member Functions inherited from orxonox::GamestateHandler | |
| GamestateHandler () | |
| virtual | ~GamestateHandler () |
Private Member Functions | |
| virtual bool | isServer_ ()=0 |
| virtual void | queuePacket (ENetPacket *packet, int clientID, uint8_t channelID)=0 |
Private Attributes | |
| bool | bIsActive_ |
Static Private Attributes | |
| static uint32_t | clientID_s = 0 |
| static std::vector< Host * > | instances_s |
Friends | |
| class | packet::Chat |
Base class of Server and Client This is the Base class of the Server and Client classes.
|
protected |
Constructor: assures that only one reference will be created and sets the pointer.
|
protectedvirtual |
Destructor: resets the instance pointer to nullptr.
|
static |
This function is used to add an enetpacket to be sent to another peer.
| packet | Packet to be added |
| clientID | ID of the client the packet should be sent to |
| channelID | ID of the channel. |
|
protectedpure virtual |
Gets called if a packet::Chat packet is received.
Passes the message to the listeners.
Implemented in orxonox::Server, and orxonox::Client.
|
protectedpure virtual |
Implemented in orxonox::Server, and orxonox::Client.
|
static |
Singleton implementation.
Return the first active instance.
|
inlinestatic |
|
inline |
|
static |
|
privatepure virtual |
Implemented in orxonox::Client, and orxonox::Server.
|
pure virtual |
Implemented in orxonox::Client, and orxonox::Server.
|
privatepure virtual |
Implemented in orxonox::Client, and orxonox::Server.
|
inlinestatic |
|
static |
Sends a chat message through the network.
| message | message to be sent |
| sourceID | the ID of the sender |
| targetID | the ID of the receiver |
|
inlineprotected |
|
inlinestatic |
|
friend |
|
private |
|
staticprivate |
|
staticprivate |
1.8.11