Query serv reimplement first steps

This commit is contained in:
KimLS 2016-12-21 14:25:33 -08:00
parent 48412087e8
commit b6d79e5af2
4 changed files with 8 additions and 6 deletions

View File

@ -389,7 +389,7 @@ IF(EQEMU_BUILD_SERVER)
ADD_SUBDIRECTORY(world)
ADD_SUBDIRECTORY(zone)
ADD_SUBDIRECTORY(ucs)
#ADD_SUBDIRECTORY(queryserv)
ADD_SUBDIRECTORY(queryserv)
ADD_SUBDIRECTORY(eqlaunch)
ENDIF(EQEMU_BUILD_SERVER)
IF(EQEMU_BUILD_LOGIN)

View File

@ -25,7 +25,6 @@
#include "../common/platform.h"
#include "../common/crash.h"
#include "../common/event/event_loop.h"
#include "../common/net/relay_link.h"
#include "../common/timer.h"
#include "database.h"
#include "queryservconfig.h"

View File

@ -23,6 +23,7 @@
#include "../common/packet_dump.h"
#include "../common/packet_functions.h"
#include "../common/servertalk.h"
#include "../common/net/packet.h"
#include "database.h"
#include "lfguild.h"
@ -51,7 +52,9 @@ WorldServer::~WorldServer()
void WorldServer::Connect()
{
m_link.reset(new EQ::Net::RelayLink(Config->WorldIP, Config->WorldTCPPort, "QS", Config->SharedKey));
m_server.reset(new EQ::Net::ServertalkServer());
//Config->WorldIP, Config->WorldTCPPort, "QS", Config->SharedKey
m_link->OnMessageType(ServerOP_Speech, std::bind(&WorldServer::HandleMessage, this, ServerOP_Speech, std::placeholders::_1));
m_link->OnMessageType(ServerOP_QSPlayerLogTrades, std::bind(&WorldServer::HandleMessage, this, ServerOP_QSPlayerLogTrades, std::placeholders::_1));
m_link->OnMessageType(ServerOP_QSPlayerLogHandins, std::bind(&WorldServer::HandleMessage, this, ServerOP_QSPlayerLogHandins, std::placeholders::_1));
@ -66,7 +69,7 @@ void WorldServer::Connect()
bool WorldServer::SendPacket(ServerPacket *pack)
{
EQ::Net::ReadOnlyPacket p(pack->pBuffer, pack->size);
m_link->SendPacket(pack->opcode, p);
->SendPacket(pack->opcode, p);
return true;
}

View File

@ -19,7 +19,7 @@
#define WORLDSERVER_H
#include "../common/eq_packet_structs.h"
#include "../common/net/relay_link.h"
#include "../common/net/servertalk_server.h"
class WorldServer
{
@ -35,7 +35,7 @@ class WorldServer
void HandleMessage(uint16 opcode, const EQ::Net::Packet &p);
private:
std::unique_ptr<EQ::Net::RelayLink> m_link;
std::unique_ptr<EQ::Net::ServertalkServer> m_server;
};
#endif