Merge TUDPServer and TTCPServer into TNetwork

this gets rid of a bunch of unclear cases which I mistakenly created
while refactoring for this rewrite. One example is having to call into
TTCPServer to do UDP sending in some cases.
This commit is contained in:
Lion Kortlepel
2021-03-08 23:45:25 +01:00
committed by Anonymous275
parent 05c5fb047c
commit 40cae31885
15 changed files with 378 additions and 451 deletions

View File

@@ -9,9 +9,8 @@ namespace fs = std::filesystem;
// necessary as lua relies on global state
TLuaEngine* TheEngine;
TLuaEngine::TLuaEngine(TServer& Server, TTCPServer& TCPServer, TUDPServer& UDPServer)
: mTCPServer(TCPServer)
, mUDPServer(UDPServer)
TLuaEngine::TLuaEngine(TServer& Server, TNetwork& Network)
: mNetwork(Network)
, mServer(Server) {
TheEngine = this;
if (!fs::exists(Application::Settings.Resource)) {
@@ -101,6 +100,3 @@ bool TLuaEngine::NewFile(const std::string& Path) {
}
return true;
}
/*TLuaEngine::~TLuaEngine() {
}*/