diff options
Diffstat (limited to 'src/Protocol/LengthenedProtocol.h')
-rw-r--r-- | src/Protocol/LengthenedProtocol.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Protocol/LengthenedProtocol.h b/src/Protocol/LengthenedProtocol.h index a6e72fe05..3f1a89a66 100644 --- a/src/Protocol/LengthenedProtocol.h +++ b/src/Protocol/LengthenedProtocol.h @@ -2,6 +2,8 @@ #pragma once #include "Protocol.h" + +class cDataSender; extern void undefined(); class cLengthenedProtocol : public cProtocol @@ -19,11 +21,26 @@ public: cProtocolError HandleHandshake(cByteBuffer & a_ByteBuffer, std::vector<std::unique_ptr<cClientAction>> & a_Actions) override WARN_UNUSED; protected: + + + /** State of the protocol. 1 = status, 2 = login, 3 = game */ + UInt32 m_State; + virtual cProtocolError DataReceived(const char * a_Data, size_t a_Size, std::vector<std::unique_ptr<cClientAction>> & a_Actions) override WARN_UNUSED; /** This method should append the actions from incoming packets to a_Action */ virtual cProtocolError OnDataAddedToBuffer(cByteBuffer & a_Buffer, std::vector<std::unique_ptr<cClientAction>> & a_Action) WARN_UNUSED = 0; + virtual void SendData(const char * a_Data, size_t a_Size) = 0; + + cDataSender * m_Sender; + private: + + AString m_ServerAddress; + + UInt16 m_ServerPort; + + bool m_ShouldAllowBungeeCord; /** Buffer for the received data */ cByteBuffer m_ReceivedData; |