World <-> Login connection reworked

This commit is contained in:
KimLS
2016-10-28 19:02:03 -07:00
parent fab8765c2f
commit 0b8b41d91f
32 changed files with 729 additions and 701 deletions
+8 -10
View File
@@ -24,39 +24,37 @@
#include "../common/queue.h"
#include "../common/eq_packet_structs.h"
#include "../common/mutex.h"
#include "../common/emu_tcp_connection.h"
#include "../common/net/servertalk_client_connection.h"
#include "../common/event/timer.h"
#include <memory>
class LoginServer{
public:
LoginServer(const char*, uint16, const char*, const char*);
~LoginServer();
bool InitLoginServer();
bool Process();
void ProcessPacket(uint16_t opcode, EQ::Net::Packet &p);
bool Connect();
void SendInfo();
void SendNewInfo();
void SendStatus();
void SendPacket(ServerPacket* pack) { tcpc->SendPacket(pack); }
void SendPacket(ServerPacket* pack) { client->SendPacket(pack); }
void SendAccountUpdate(ServerPacket* pack);
bool ConnectReady() { return tcpc->ConnectReady(); }
bool Connected() { return tcpc->Connected(); }
bool Connected() { return client->Connected(); }
bool MiniLogin() { return minilogin; }
bool CanUpdate() { return CanAccountUpdate; }
private:
bool minilogin;
EmuTCPConnection* tcpc;
std::unique_ptr<EQ::Net::ServertalkClient> client;
std::unique_ptr<EQ::Timer> statusupdate_timer;
char LoginServerAddress[256];
uint32 LoginServerIP;
uint16 LoginServerPort;
char LoginAccount[32];
char LoginPassword[32];
bool CanAccountUpdate;
Timer statusupdate_timer;
};
#endif