mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-25 22:57:15 +00:00
Comms stuff
This commit is contained in:
+2
-2
@@ -40,7 +40,7 @@ ChatChannelList *ChannelList;
|
||||
Clientlist *g_Clientlist;
|
||||
EQEmuLogSys LogSys;
|
||||
Database database;
|
||||
WorldServer *worldserver = nullptr;
|
||||
std::unique_ptr<WorldServer> worldserver;
|
||||
|
||||
const ucsconfig *Config;
|
||||
|
||||
@@ -142,7 +142,7 @@ int main() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
worldserver = new WorldServer;
|
||||
worldserver.reset(new WorldServer());
|
||||
|
||||
while(RunLoops) {
|
||||
|
||||
|
||||
+3
-3
@@ -47,16 +47,16 @@ void Client50ToServerSayLink(std::string& serverSayLink, const std::string& clie
|
||||
void Client55ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink);
|
||||
|
||||
WorldServer::WorldServer()
|
||||
: WorldConnection::WorldConnection("UCS")
|
||||
{
|
||||
m_connection.reset(new EQ::Net::ServertalkClient(Config->WorldIP, Config->WorldTCPPort, false, "UCS", Config->SharedKey));
|
||||
m_connection->OnMessage(std::bind(&WorldServer::ProcessMessage, this, std::placeholders::_1, std::placeholders::_2));
|
||||
SetOnMessageHandler(std::bind(&WorldServer::ProcessMessage, this, std::placeholders::_1, std::placeholders::_2));
|
||||
}
|
||||
|
||||
WorldServer::~WorldServer()
|
||||
{
|
||||
}
|
||||
|
||||
void WorldServer::ProcessMessage(uint16 opcode, EQ::Net::Packet &p)
|
||||
void WorldServer::ProcessMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
{
|
||||
ServerPacket tpack(opcode, p);
|
||||
ServerPacket *pack = &tpack;
|
||||
|
||||
+3
-9
@@ -18,20 +18,14 @@
|
||||
#ifndef WORLDSERVER_H
|
||||
#define WORLDSERVER_H
|
||||
|
||||
#include "../net/servertalk_client_connection.h"
|
||||
#include "../common/eq_packet_structs.h"
|
||||
#include <memory>
|
||||
#include "../world_connection.h"
|
||||
|
||||
class WorldServer
|
||||
class WorldServer : public EQ::WorldConnection
|
||||
{
|
||||
public:
|
||||
WorldServer();
|
||||
~WorldServer();
|
||||
void ProcessMessage(uint16 opcode, EQ::Net::Packet &);
|
||||
|
||||
private:
|
||||
|
||||
std::unique_ptr<EQ::Net::ServertalkClient> m_connection;
|
||||
void ProcessMessage(uint16 opcode, const EQ::Net::Packet &p);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user