PR00F's Game Engine's wrapper for GameNetworkingSockets library.
More...
PR00F's Game Engine's wrapper for GameNetworkingSockets library.
Definition at line 48 of file PgeGnsWrapper.h.
#include <PgeGnsWrapper.h>
◆ ~PgeGnsWrapper()
PgeGnsWrapper::~PgeGnsWrapper |
( |
| ) |
|
|
virtual |
◆ PgeGnsWrapper() [1/2]
◆ PgeGnsWrapper() [2/2]
◆ destroy()
bool PgeGnsWrapper::destroy |
( |
| ) |
|
|
virtual |
Uninitializes the GameNetworkingSockets library.
Should be extended by derived classes by closing their connections, before them invoking this.
- Returns
- True if uninitialization is successful or not initialized, false otherwise.
Reimplemented in PgeGnsClient, and PgeGnsServer.
Definition at line 80 of file PgeGnsWrapper.cpp.
◆ getAllowListedAppMessages()
◆ getAllowListedPgeMessages()
◆ getDetailedConnectionStatus()
std::string PgeGnsWrapper::getDetailedConnectionStatus |
( |
const HSteamNetConnection & | connHandle | ) |
const |
|
protected |
◆ getInjectByteCount()
uint32_t PgeGnsWrapper::getInjectByteCount |
( |
| ) |
const |
◆ getInjectMsgCount()
◆ getInjectPacketCount()
uint32_t PgeGnsWrapper::getInjectPacketCount |
( |
| ) |
const |
◆ getInjectPacketPerSecondCount()
uint32_t PgeGnsWrapper::getInjectPacketPerSecondCount |
( |
| ) |
const |
◆ getMsgAppId2StringMap()
◆ getPacketQueueSize()
std::size_t PgeGnsWrapper::getPacketQueueSize |
( |
| ) |
const |
◆ getRxByteCount()
uint32_t PgeGnsWrapper::getRxByteCount |
( |
| ) |
const |
◆ getRxMsgCount()
◆ getRxPacketCount()
uint32_t PgeGnsWrapper::getRxPacketCount |
( |
| ) |
const |
◆ getRxPacketPerSecondCount()
uint32_t PgeGnsWrapper::getRxPacketPerSecondCount |
( |
| ) |
const |
◆ getStringByMsgAppId()
◆ getTxByteCount()
uint32_t PgeGnsWrapper::getTxByteCount |
( |
| ) |
const |
◆ getTxMsgCount()
◆ getTxPacketCount()
uint32_t PgeGnsWrapper::getTxPacketCount |
( |
| ) |
const |
◆ getTxPacketPerSecondCount()
uint32_t PgeGnsWrapper::getTxPacketPerSecondCount |
( |
| ) |
const |
◆ init()
bool PgeGnsWrapper::init |
( |
| ) |
|
Initializes the GameNetworkingSockets library.
- Returns
- True if initialization successful, false if initialization is unsuccessful or if it is already initialized.
Definition at line 44 of file PgeGnsWrapper.cpp.
◆ isInitialized()
bool PgeGnsWrapper::isInitialized |
( |
| ) |
const |
Gets the state of initialization of the GameNetworkingSockets library.
This is not the state of any active connection, for that check available functions in the derived classes.
- Returns
- True if initialized, false otherwise.
Definition at line 127 of file PgeGnsWrapper.cpp.
◆ logDetailedConnectionStatus()
void PgeGnsWrapper::logDetailedConnectionStatus |
( |
const HSteamNetConnection & | connHandle | ) |
const |
|
protected |
◆ onSteamNetConnectionStatusChanged()
virtual void PgeGnsWrapper::onSteamNetConnectionStatusChanged |
( |
SteamNetConnectionStatusChangedCallback_t * | pInfo | ) |
|
|
protectedpure virtual |
◆ operator=()
◆ pgeMessageIsHandledAtGnsLevel()
◆ pollConnectionStateChanges()
void PgeGnsWrapper::pollConnectionStateChanges |
( |
| ) |
|
◆ pollIncomingMessages()
bool PgeGnsWrapper::pollIncomingMessages |
( |
| ) |
|
Moves incoming SteamNetworkingMessages from GameNetworkingSockets layer to m_queuePackets as PgePackets.
- Returns
- True on success, false on error.
Definition at line 132 of file PgeGnsWrapper.cpp.
◆ popFrontPacket()
◆ receiveMessages()
virtual int PgeGnsWrapper::receiveMessages |
( |
ISteamNetworkingMessage ** | pIncomingMsg, |
|
|
int | nIncomingMsgArraySize ) const |
|
protectedpure virtual |
◆ steamNetConnectionStatusChangedCallback()
void PgeGnsWrapper::steamNetConnectionStatusChangedCallback |
( |
SteamNetConnectionStatusChangedCallback_t * | pInfo | ) |
|
|
staticprotected |
◆ updateIncomingPgePacket()
virtual void PgeGnsWrapper::updateIncomingPgePacket |
( |
pge_network::PgePacket & | pkt, |
|
|
const HSteamNetConnection & | connHandle ) const |
|
protectedpure virtual |
◆ validateSteamNetworkingMessage()
virtual bool PgeGnsWrapper::validateSteamNetworkingMessage |
( |
const HSteamNetConnection & | connHandle | ) |
const |
|
protectedpure virtual |
◆ DEFAULT_SERVER_PORT
const uint16 PgeGnsWrapper::DEFAULT_SERVER_PORT = 27020 |
|
static |
◆ m_allowListedAppMessages
◆ m_allowListedPgeMessages
◆ m_cfgProfiles
◆ m_mapMsgAppId2String
◆ m_nInjectByteCount
uint32_t PgeGnsWrapper::m_nInjectByteCount |
|
protected |
◆ m_nInjectMsgCount
◆ m_nInjectPktCount
uint32_t PgeGnsWrapper::m_nInjectPktCount |
|
protected |
◆ m_nRxByteCount
uint32_t PgeGnsWrapper::m_nRxByteCount |
|
protected |
◆ m_nRxMsgCount
◆ m_nRxPktCount
uint32_t PgeGnsWrapper::m_nRxPktCount |
|
protected |
◆ m_nTxByteCount
uint32_t PgeGnsWrapper::m_nTxByteCount |
|
protected |
◆ m_nTxMsgCount
◆ m_nTxPktCount
uint32_t PgeGnsWrapper::m_nTxPktCount |
|
protected |
◆ m_pInterface
ISteamNetworkingSockets* PgeGnsWrapper::m_pInterface |
|
protected |
◆ m_queuePackets
◆ m_sAppVersion
std::string PgeGnsWrapper::m_sAppVersion |
|
protected |
Expected client app version in case of server instance, or simply client app version in case of client instance.
Definition at line 148 of file PgeGnsWrapper.h.
◆ m_time1stInjectPkt
std::chrono::time_point<std::chrono::steady_clock> PgeGnsWrapper::m_time1stInjectPkt |
|
protected |
◆ m_time1stRxPkt
std::chrono::time_point<std::chrono::steady_clock> PgeGnsWrapper::m_time1stRxPkt |
|
protected |
◆ m_time1stTxPkt
std::chrono::time_point<std::chrono::steady_clock> PgeGnsWrapper::m_time1stTxPkt |
|
protected |
◆ s_pCallbackInstance
The documentation for this class was generated from the following files: