Working zone and world communication yay

This commit is contained in:
KimLS
2017-01-03 22:23:03 -08:00
parent 2447c38c82
commit f6ca59fbc6
20 changed files with 74 additions and 114 deletions
@@ -19,6 +19,7 @@ namespace EQ
void SendPacket(ServerPacket *p);
void OnConnect(std::function<void(ServertalkLegacyClient*)> cb) { m_on_connect_cb = cb; }
void OnMessage(uint16_t opcode, std::function<void(uint16_t, EQ::Net::Packet&)> cb);
void OnMessage(std::function<void(uint16_t, EQ::Net::Packet&)> cb);
bool Connected() const { return m_connecting != true; }
std::shared_ptr<EQ::Net::TCPConnection> Handle() { return m_connection; }
@@ -36,6 +37,7 @@ namespace EQ
std::shared_ptr<EQ::Net::TCPConnection> m_connection;
std::vector<char> m_buffer;
std::unordered_map<uint16_t, std::function<void(uint16_t, EQ::Net::Packet&)>> m_message_callbacks;
std::function<void(uint16_t, EQ::Net::Packet&)> m_message_callback;
std::function<void(ServertalkLegacyClient*)> m_on_connect_cb;
};
}