mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Cleaned up web interface server, starting work on getting tcp connections to persist then will hook it up to the websockets/http/whatever else we deem worthy.
This commit is contained in:
@@ -366,13 +366,13 @@ bool EmuTCPConnection::LineOutQueuePush(char* line) {
|
||||
safe_delete_array(line);
|
||||
return(true);
|
||||
}
|
||||
if (strcmp(line, "**PACKETMODESS**") == 0) {
|
||||
if (strcmp(line, "**PACKETMODEWI**") == 0) {
|
||||
MSendQueue.lock();
|
||||
safe_delete_array(sendbuf);
|
||||
if (TCPMode == modeConsole)
|
||||
Send((const uchar*) "\0**PACKETMODESS**\r", 18);
|
||||
Send((const uchar*) "\0**PACKETMODEWI**\r", 18);
|
||||
TCPMode = modePacket;
|
||||
PacketMode = packetModeSocket_Server;
|
||||
PacketMode = packetModeWebInterface;
|
||||
EmuTCPNetPacket_Struct* tnps = 0;
|
||||
while ((tnps = InModeQueue.pop())) {
|
||||
SendPacket(tnps);
|
||||
@@ -435,12 +435,12 @@ bool EmuTCPConnection::ConnectIP(uint32 irIP, uint16 irPort, char* errbuf) {
|
||||
sendbuf = new uchar[sendbuf_size];
|
||||
memcpy(sendbuf, "\0**PACKETMODEQS**\r", sendbuf_size);
|
||||
}
|
||||
else if (PacketMode == packetModeSocket_Server) {
|
||||
else if (PacketMode == packetModeWebInterface) {
|
||||
safe_delete_array(sendbuf);
|
||||
sendbuf_size = 18;
|
||||
sendbuf_used = sendbuf_size;
|
||||
sendbuf = new uchar[sendbuf_size];
|
||||
memcpy(sendbuf, "\0**PACKETMODESS**\r", sendbuf_size);
|
||||
memcpy(sendbuf, "\0**PACKETMODEWI**\r", sendbuf_size);
|
||||
}
|
||||
else {
|
||||
//default: packetModeZone
|
||||
|
||||
@@ -30,7 +30,7 @@ class EmuTCPServer;
|
||||
class EmuTCPConnection : public TCPConnection {
|
||||
public:
|
||||
enum eTCPMode { modeConsole, modeTransition, modePacket };
|
||||
enum ePacketMode { packetModeZone, packetModeLauncher, packetModeLogin, packetModeUCS, packetModeQueryServ, packetModeSocket_Server };
|
||||
enum ePacketMode { packetModeZone, packetModeLauncher, packetModeLogin, packetModeUCS, packetModeQueryServ, packetModeWebInterface };
|
||||
|
||||
EmuTCPConnection(uint32 ID, EmuTCPServer* iServer, SOCKET iSock, uint32 irIP, uint16 irPort, bool iOldFormat = false);
|
||||
EmuTCPConnection(bool iOldFormat = false, EmuTCPServer* iRelayServer = 0, eTCPMode iMode = modePacket); // for outgoing connections
|
||||
|
||||
+6
-6
@@ -65,12 +65,12 @@ LOG_TYPE( QUERYSERV, CLIENT, DISABLED )
|
||||
LOG_TYPE( QUERYSERV, TRACE, DISABLED )
|
||||
LOG_TYPE( QUERYSERV, PACKETS, DISABLED)
|
||||
|
||||
LOG_CATEGORY(SOCKET_SERVER)
|
||||
LOG_TYPE(SOCKET_SERVER, INIT, ENABLED)
|
||||
LOG_TYPE(SOCKET_SERVER, ERROR, ENABLED)
|
||||
LOG_TYPE(SOCKET_SERVER, CLIENT, DISABLED)
|
||||
LOG_TYPE(SOCKET_SERVER, TRACE, DISABLED)
|
||||
LOG_TYPE(SOCKET_SERVER, PACKETS, DISABLED)
|
||||
LOG_CATEGORY( WEB_INTERFACE )
|
||||
LOG_TYPE( WEB_INTERFACE, INIT, ENABLED )
|
||||
LOG_TYPE( WEB_INTERFACE, ERROR, ENABLED )
|
||||
LOG_TYPE( WEB_INTERFACE, CLIENT, DISABLED )
|
||||
LOG_TYPE( WEB_INTERFACE, TRACE, DISABLED )
|
||||
LOG_TYPE( WEB_INTERFACE, PACKETS, DISABLED )
|
||||
|
||||
LOG_CATEGORY( SPAWNS )
|
||||
LOG_TYPE( SPAWNS, MAIN, DISABLED )
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ enum EQEmuExePlatform
|
||||
ExePlatformWorld,
|
||||
ExePlatformLogin,
|
||||
ExePlatformQueryServ,
|
||||
ExePlatformSocket_Server,
|
||||
ExePlatformWebInterface,
|
||||
ExePlatformUCS,
|
||||
ExePlatformLaunch,
|
||||
ExePlatformSharedMemory,
|
||||
|
||||
Reference in New Issue
Block a user