diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-07-31 19:26:33 +0200 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-07-31 19:26:33 +0200 |
commit | d19cde93fa3344f318fb0d4ffbf5bb0397a51a75 (patch) | |
tree | b5ee221d8a8e63c7d3b7868da1db19bf717a6ffd /src/Protocol/ProtocolRecognizer.h | |
parent | Merge pull request #2400 from cuberite/OffloadBadChunks (diff) | |
parent | Unified the doxy-comment format. (diff) | |
download | cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.gz cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.bz2 cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.lz cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.xz cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.zst cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/ProtocolRecognizer.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/Protocol/ProtocolRecognizer.h b/src/Protocol/ProtocolRecognizer.h index 090e36799..d3cfd9bf7 100644 --- a/src/Protocol/ProtocolRecognizer.h +++ b/src/Protocol/ProtocolRecognizer.h @@ -41,13 +41,13 @@ public: cProtocolRecognizer(cClientHandle * a_Client); virtual ~cProtocolRecognizer(); - /// Translates protocol version number into protocol version text: 49 -> "1.4.4" + /** Translates protocol version number into protocol version text: 49 -> "1.4.4" */ static AString GetVersionTextFromInt(int a_ProtocolVersion); - /// Called when client sends some data: + /** Called when client sends some data: */ virtual void DataReceived(const char * a_Data, size_t a_Size) override; - /// Sending stuff to clients (alphabetically sorted): + /** Sending stuff to clients (alphabetically sorted): */ virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle) override; virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) override; virtual void SendBlockBreakAnim (UInt32 a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage) override; @@ -140,15 +140,19 @@ public: virtual void SendData(const char * a_Data, size_t a_Size) override; protected: - cProtocol * m_Protocol; ///< The recognized protocol - cByteBuffer m_Buffer; ///< Buffer for the incoming data until we recognize the protocol + /** The recognized protocol */ + cProtocol * m_Protocol; + + /** Buffer for the incoming data until we recognize the protocol */ + cByteBuffer m_Buffer; - /// Tries to recognize protocol based on m_Buffer contents; returns true if recognized + + /** Tries to recognize protocol based on m_Buffer contents; returns true if recognized */ bool TryRecognizeProtocol(void); /** Tries to recognize a protocol in the lengthed family (1.7+), based on m_Buffer; returns true if recognized. The packet length and type have already been read, type is 0 - The number of bytes remaining in the packet is passed as a_PacketLengthRemaining. **/ + The number of bytes remaining in the packet is passed as a_PacketLengthRemaining. */ bool TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRemaining); /** Sends a single packet contained within the cPacketizer class. |