Initial Socket Server implementation with CMakeLists.txt updated. Socket server will connect to world at this point.

This commit is contained in:
Chris M
2014-07-02 22:17:45 -05:00
parent bd86e70766
commit a92b4c04e9
18 changed files with 735 additions and 6 deletions
+13 -3
View File
@@ -46,6 +46,7 @@
#include "LauncherList.h"
#include "ucs.h"
#include "queryserv.h"
#include "socket_server.h"
#ifdef _WINDOWS
#define snprintf _snprintf
@@ -60,6 +61,7 @@ extern ClientList client_list;
extern LauncherList launcher_list;
extern UCSConnection UCSLink;
extern QueryServConnection QSLink;
extern Socket_Server_Connection SSLink;
extern volatile bool RunLoops;
ConsoleList console_list;
@@ -250,18 +252,26 @@ bool Console::Process() {
_log(WORLD__CONSOLE,"New launcher from %s:%d", inet_ntoa(in), GetPort());
launcher_list.Add(tcpc);
tcpc = 0;
} else if(tcpc->GetPacketMode() == EmuTCPConnection::packetModeUCS)
}
else if(tcpc->GetPacketMode() == EmuTCPConnection::packetModeUCS)
{
_log(WORLD__CONSOLE,"New UCS Connection from %s:%d", inet_ntoa(in), GetPort());
UCSLink.SetConnection(tcpc);
tcpc = 0;
}
else if(tcpc->GetPacketMode() == EmuTCPConnection::packetModeQueryServ)
else if(tcpc->GetPacketMode() == EmuTCPConnection::packetModeQueryServ)
{
_log(WORLD__CONSOLE,"New QS Connection from %s:%d", inet_ntoa(in), GetPort());
QSLink.SetConnection(tcpc);
tcpc = 0;
} else {
}
else if (tcpc->GetPacketMode() == EmuTCPConnection::packetModeSocket_Server)
{
_log(WORLD__CONSOLE, "New Socket Server Connection from %s:%d", inet_ntoa(in), GetPort());
SSLink.SetConnection(tcpc);
tcpc = 0;
}
else {
_log(WORLD__CONSOLE,"Unsupported packet mode from %s:%d", inet_ntoa(in), GetPort());
}
return false;