mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Initial work on TCP transport layer:
* Optionally compiled additional TCP transport layer. * Config to enable it. * Tested and functional with lcdr's tcpudp dll, udp being disabled in the dll due to port issues. * Removed unused RakNet replica manager and id manager. We've got our own replica manager since pre-open-source. * Utilizes async boost behavior. Todo: * Figure out how to do ping calculations. * Fix crashes on universe shutdown. * Test TLS on a VPS. * Remove unnecessary logging. * Test with lots of clients. * Finish "master" to "manager" naming refactor.
This commit is contained in:
@@ -45,9 +45,10 @@
|
||||
|
||||
// Enums
|
||||
#include "eGameMasterLevel.h"
|
||||
#include "eMasterMessageType.h"
|
||||
#include "eManagerMessageType.h"
|
||||
#include "eInventoryType.h"
|
||||
#include "ePlayerFlag.h"
|
||||
#include <RakNetTransportLayer.h>
|
||||
|
||||
|
||||
namespace DEVGMCommands {
|
||||
@@ -503,7 +504,7 @@ namespace DEVGMCommands {
|
||||
void ShutdownUniverse(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
|
||||
//Tell the master server that we're going to be shutting down whole "universe":
|
||||
CBITSTREAM;
|
||||
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::SHUTDOWN_UNIVERSE);
|
||||
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eManagerMessageType::SHUTDOWN_UNIVERSE);
|
||||
Game::server->SendToMaster(bitStream);
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Sent universe shutdown notification to master.");
|
||||
|
||||
@@ -1247,8 +1248,16 @@ namespace DEVGMCommands {
|
||||
|
||||
scriptedActivityComponent->ReloadConfig();
|
||||
}
|
||||
Game::server->UpdateMaximumMtuSize();
|
||||
Game::server->UpdateBandwidthLimit();
|
||||
|
||||
if (Game::server->GetTransportType() == TransportType::RakNet) {
|
||||
const auto& transport = Game::server->GetTransportLayer();
|
||||
|
||||
auto* raknetTransport = static_cast<RakNetTransportLayer*>(transport.get());
|
||||
|
||||
raknetTransport->UpdateMaximumMtuSize();
|
||||
raknetTransport->UpdateBandwidthLimit();
|
||||
}
|
||||
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Successfully reloaded config for world!");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user