mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-22 19:58:24 +00:00
Some changes to the tasks service and the general routing strategy
This commit is contained in:
+3
-2
@@ -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
@@ -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
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user