|
|
|
@ -30,6 +30,7 @@
|
|
|
|
|
|
|
|
|
|
#include <SDL_messagebox.h>
|
|
|
|
|
#include <RakSleep.h>
|
|
|
|
|
#include <RakNetStatistics.h>
|
|
|
|
|
#include <iomanip>
|
|
|
|
|
#include <components/version/version.hpp>
|
|
|
|
|
|
|
|
|
@ -194,6 +195,7 @@ Networking::~Networking()
|
|
|
|
|
RakNet::RakPeerInterface::DestroyInstance(peer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Networking::update()
|
|
|
|
|
{
|
|
|
|
|
RakNet::Packet *packet;
|
|
|
|
@ -450,3 +452,11 @@ bool Networking::isConnected()
|
|
|
|
|
{
|
|
|
|
|
return connected;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::string Networking::getNetworkStatistics()
|
|
|
|
|
{
|
|
|
|
|
static char message[2048];
|
|
|
|
|
auto rss = peer->GetStatistics(peer->GetSystemAddressFromIndex(0));
|
|
|
|
|
StatisticsToString(rss, message, 2);
|
|
|
|
|
return message;
|
|
|
|
|
}
|
|
|
|
|