PGE API 0.4
PR00F's Game Engine full documentation
|
Definition at line 20 of file PgeClient.cpp.
Public Member Functions | |
virtual | ~PgeClientImpl () |
Calls shutdown(). | |
bool | initialize () override |
Initialize the client subsystem. | |
bool | shutdown () override |
This stops the client subsystem. | |
bool | isInitialized () const override |
Gets the state of the client subsystem. | |
void | disconnect (const std::string &sExtraDebugText="") override |
Terminates the active connection of the client instance. | |
void | Update () override |
bool | pollIncomingMessages () override |
Moves incoming packets from the underlying network layer to PGE network layer as PgePackets. | |
void | pollConnectionStateChanges () override |
std::size_t | getPacketQueueSize () const override |
pge_network::PgePacket | popFrontPacket () noexcept(false) override |
std::set< pge_network::PgePktId > & | getAllowListedPgeMessages () override |
std::set< pge_network::MsgApp::TMsgId > & | getAllowListedAppMessages () override |
void | send (const pge_network::PgePacket &pkt, const pge_network::PgeNetworkConnectionHandle &connHandle=pge_network::ServerConnHandle) override |
Sends the given packet to the network instance specified. | |
uint32_t | getRxPacketCount () const override |
uint32_t | getTxPacketCount () const override |
uint32_t | getInjectPacketCount () const override |
uint32_t | getRxPacketPerSecondCount () const override |
uint32_t | getTxPacketPerSecondCount () const override |
uint32_t | getInjectPacketPerSecondCount () const override |
const std::map< pge_network::MsgApp::TMsgId, uint32_t > & | getRxMsgCount () const override |
const std::map< pge_network::MsgApp::TMsgId, uint32_t > & | getTxMsgCount () const override |
const std::map< pge_network::MsgApp::TMsgId, uint32_t > & | getInjectMsgCount () const override |
std::map< pge_network::MsgApp::TMsgId, std::string > & | getMsgAppId2StringMap () override |
uint32_t | getRxByteCount () const override |
uint32_t | getTxByteCount () const override |
uint32_t | getInjectByteCount () const override |
void | WriteList () const override |
Writes statistics to console. | |
bool | connectToServer (const std::string &sServerAddress, const std::string &sAppVersion="") override |
Opens a connection to a server instance. | |
const pge_network::PgeNetworkConnectionHandle & | getConnectionHandle () const override |
Returns client's handle to the connection opened towards the server. | |
const pge_network::PgeNetworkConnectionHandle & | getConnectionHandleServerSide () const override |
Returns server's handle to the connection opened towards this client. | |
const char * | getServerAddress () const override |
int | getPing (bool bForceUpdate) override |
float | getQualityLocal (bool bForceUpdate) override |
float | getQualityRemote (bool bForceUpdate) override |
float | getRxByteRate (bool bForceUpdate) override |
float | getTxByteRate (bool bForceUpdate) override |
int64_t | getPendingUnreliableBytes (bool bForceUpdate) override |
int64_t | getPendingReliableBytes (bool bForceUpdate) override |
int64_t | getSentButUnAckedReliableBytes (bool bForceUpdate) override |
int64_t | getInternalQueueTimeUSecs (bool bForceUpdate) override |
std::string | getDetailedConnectionStatus () const override |
![]() | |
CConsole & | getConsole () const |
Returns access to console preset with logger module name as this class. | |
![]() | |
![]() |
Private Member Functions | |
PgeClientImpl (PGEcfgProfiles &cfgProfiles) | |
PgeClientImpl (const PgeClientImpl &) | |
PgeClientImpl & | operator= (const PgeClientImpl &) |
Private Attributes | |
PGEcfgProfiles & | m_cfgProfiles |
PgeGnsClient & | m_gnsClient |
Friends | |
class | pge_network::PgeClient |
Additional Inherited Members | |
![]() | |
static PgeIClient & | createAndGet (PGEcfgProfiles &cfgProfiles) |
Creates and gets the singleton implementation instance. | |
![]() | |
static const char * | getLoggerModuleName () |
Returns the logger module name of this class. | |
|
virtual |
Calls shutdown().
Definition at line 111 of file PgeClient.cpp.
|
explicitprivate |
Definition at line 376 of file PgeClient.cpp.
|
private |
Definition at line 384 of file PgeClient.cpp.
|
overridevirtual |
Opens a connection to a server instance.
If the function is successful, any call to the derived isInitialized() and isConnected() is expected to return true. Note: you can disconnect from server by invoking the derived disconnect() or shutdown() which are implemented already in hidden class.
sServerAddress | IPv4 or IPv6 address of PgeServer we want to connect to. |
sAppVersion | Client application version. If server expects a specific client version, we should fill it here. |
Implements pge_network::PgeIClient.
Definition at line 314 of file PgeClient.cpp.
|
overridevirtual |
Terminates the active connection of the client instance.
sExtraDebugText | An optional text that will be sent to the other side and will be logged to help debugging. |
Implements pge_network::PgeIServerClient.
Definition at line 152 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 195 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 190 of file PgeClient.cpp.
|
overridevirtual |
Returns client's handle to the connection opened towards the server.
Implements pge_network::PgeIClient.
Definition at line 299 of file PgeClient.cpp.
|
overridevirtual |
Returns server's handle to the connection opened towards this client.
Implements pge_network::PgeIClient.
Definition at line 304 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIClient.
Definition at line 364 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 270 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 250 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 220 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 235 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIClient.
Definition at line 359 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 255 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 180 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIClient.
Definition at line 349 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIClient.
Definition at line 344 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIClient.
Definition at line 319 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIClient.
Definition at line 324 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIClient.
Definition at line 329 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 260 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIClient.
Definition at line 334 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 240 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 210 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 225 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIClient.
Definition at line 354 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIClient.
Definition at line 309 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 265 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIClient.
Definition at line 339 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 245 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 215 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 230 of file PgeClient.cpp.
|
overridevirtual |
Initialize the client subsystem.
Implements pge_network::PgeIServerClient.
Definition at line 121 of file PgeClient.cpp.
|
overridevirtual |
Gets the state of the client subsystem.
Implements pge_network::PgeIServerClient.
Definition at line 142 of file PgeClient.cpp.
|
private |
Definition at line 390 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 175 of file PgeClient.cpp.
|
overridevirtual |
Moves incoming packets from the underlying network layer to PGE network layer as PgePackets.
Implements pge_network::PgeIServerClient.
Definition at line 166 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 185 of file PgeClient.cpp.
|
overridevirtual |
Sends the given packet to the network instance specified.
pkt | The packet to be sent. |
connHandle | The addressed network instance, that can be either a server or client instance. The default parameter means the addressed instance is the server instance. If server is specified and current instance is the server, the packet will be injected to self instead of actually sending it to the lower network level. |
Implements pge_network::PgeIServerClient.
Definition at line 200 of file PgeClient.cpp.
|
overridevirtual |
This stops the client subsystem.
No effect before initialization. After shutdown, initialize() and connectToServer() can be called again.
Implements pge_network::PgeIServerClient.
Definition at line 133 of file PgeClient.cpp.
|
overridevirtual |
Implements pge_network::PgeIServerClient.
Definition at line 157 of file PgeClient.cpp.
|
overridevirtual |
Writes statistics to console.
Implements pge_network::PgeIServerClient.
Definition at line 275 of file PgeClient.cpp.
|
friend |
Definition at line 101 of file PgeClient.cpp.
|
private |
Definition at line 94 of file PgeClient.cpp.
|
private |
Definition at line 95 of file PgeClient.cpp.