Major rewrite of the network

This commit is contained in:
Anonymous275
2020-05-10 23:37:45 +03:00
parent b0c6c2bac4
commit 131e64b706
18 changed files with 549 additions and 6400 deletions

View File

@@ -15,12 +15,13 @@ void DebugData();
void LogInit();
void ParseConfig();
void addToLog(const string& Data);
void ServerMain(int Port, int MaxClients);
//void ServerMain(int Port, int MaxClients);
void HeartbeatInit();
string ServerVersion = "0.1";
string ClientVersion = "0.21";
void HandleResources(const std::string& path);
void TCPMain(int Port);
//void TCPMain(int Port);
void NetMain();
//Entry
int main() {
LogInit();
@@ -29,9 +30,10 @@ int main() {
HeartbeatInit();
if(Debug)DebugData();
setLoggerLevel(0); //0 for all
std::thread TCPThread(TCPMain,Port);
TCPThread.detach();
ServerMain(Port, MaxPlayers);
/*std::thread TCPThread(TCPMain,Port);
TCPThread.detach();*/
//ServerMain(Port, MaxPlayers);
NetMain();
}