Some changes to the tasks service and the general routing strategy

This commit is contained in:
KimLS
2019-06-10 01:10:28 -07:00
parent b3a3d9bec5
commit 65c9c86556
26 changed files with 360 additions and 314 deletions
+3 -2
View File
@@ -2832,8 +2832,9 @@ void command_spawn(Client *c, const Seperator *sep)
void command_test(Client *c, const Seperator *sep)
{
EQ::Net::DynamicPacket p;
p.PutCString(0, "TestPacket");
worldserver.RouteMessage("Tasks", 1234, p);
p.PutInt32(0, 1234);
p.PutCString(p.Length(), "TestPacket");
worldserver.RouteMessage("Tasks", "", p);
//c->Message(15, "Triggering test command");
//
+3 -10
View File
@@ -118,10 +118,10 @@ uint16 WorldServer::GetPort() const
return 0;
}
void WorldServer::RouteMessage(const std::string &filter, int type, const EQ::Net::Packet &p)
void WorldServer::RouteMessage(const std::string &filter, const std::string &id, const EQ::Net::Packet &p)
{
if (m_connection) {
m_connection->RouteMessage(filter, type, p);
m_connection->RouteMessage(filter, id, p);
}
}
@@ -196,14 +196,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
ServerPacket *pack = &tpack;
switch (opcode) {
case 0: {
break;
}
case ServerOP_KeepAlive: {
// ignore this
break;
}
// World is tellins us what port to use.
// World is tellins us what port to use.
case ServerOP_SetConnectInfo: {
if (pack->size != sizeof(ServerConnectInfo))
break;
+1 -1
View File
@@ -35,7 +35,7 @@ public:
void SendPacket(ServerPacket* pack);
std::string GetIP() const;
uint16 GetPort() const;
void RouteMessage(const std::string &filter, int type, const EQ::Net::Packet& p);
void RouteMessage(const std::string &filter, const std::string &id, const EQ::Net::Packet& p);
void HandleMessage(uint16 opcode, const EQ::Net::Packet &p);