mirror of https://github.com/SeanOMik/libki.git
net: Add a method to get the MessageManager instance from a DMLSession
This commit is contained in:
parent
1927426034
commit
e26a20d650
|
@ -18,6 +18,8 @@ namespace net
|
|||
DMLSession(uint16_t id, const dml::MessageManager &manager);
|
||||
virtual ~DMLSession() = default;
|
||||
|
||||
const dml::MessageManager &get_manager() const;
|
||||
|
||||
void send_message(const dml::Message &message);
|
||||
protected:
|
||||
void on_application_message(const PacketHeader& header) override;
|
||||
|
|
|
@ -9,6 +9,11 @@ namespace net
|
|||
DMLSession::DMLSession(const uint16_t id, const dml::MessageManager& manager)
|
||||
: Session(id), m_manager(manager) {}
|
||||
|
||||
const dml::MessageManager& DMLSession::get_manager() const
|
||||
{
|
||||
return m_manager;
|
||||
}
|
||||
|
||||
void DMLSession::send_message(const dml::Message& message)
|
||||
{
|
||||
send_packet(false, 0, message);
|
||||
|
|
Loading…
Reference in New Issue