diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-08 11:35:21 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-08 11:35:21 +0200 |
commit | 10a30a03e38116fe084138662bd59147331dd883 (patch) | |
tree | 0f992fcb2d4e32a0eebc7fe196388af8b9262cfa /src/Protocol/Protocol.h | |
parent | Implemented packet compression. (diff) | |
download | cuberite-10a30a03e38116fe084138662bd59147331dd883.tar cuberite-10a30a03e38116fe084138662bd59147331dd883.tar.gz cuberite-10a30a03e38116fe084138662bd59147331dd883.tar.bz2 cuberite-10a30a03e38116fe084138662bd59147331dd883.tar.lz cuberite-10a30a03e38116fe084138662bd59147331dd883.tar.xz cuberite-10a30a03e38116fe084138662bd59147331dd883.tar.zst cuberite-10a30a03e38116fe084138662bd59147331dd883.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Protocol/Protocol.h b/src/Protocol/Protocol.h index 8e1842ec1..5811e5bff 100644 --- a/src/Protocol/Protocol.h +++ b/src/Protocol/Protocol.h @@ -46,7 +46,8 @@ typedef unsigned char Byte; class cProtocol { public: - cProtocol(cClientHandle * a_Client) : + cProtocol(cClientHandle * a_Client, int a_ProtocolVersion) : + m_ProtocolVersion(a_ProtocolVersion), m_Client(a_Client) { } @@ -130,7 +131,11 @@ public: /// Returns the ServerID used for authentication through session.minecraft.net virtual AString GetAuthServerID(void) = 0; + /** Returns the protocol version of this protocol. */ + int GetProtocolVersion(void) const { return m_ProtocolVersion; } + protected: + int m_ProtocolVersion; cClientHandle * m_Client; cCriticalSection m_CSPacket; // Each SendXYZ() function must acquire this CS in order to send the whole packet at once |