summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_9.h
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-09-04 17:58:38 +0200
committerAlexander Harkness <me@bearbin.net>2017-09-04 17:58:38 +0200
commit028a35ef0d4719e56a5bcc1a3f2a780128498f5d (patch)
tree67d5e9a4fdf9a89f59578b47149799b5b9550719 /src/Protocol/Protocol_1_9.h
parentGetPacketID for protocol packet IDs (#3977) (diff)
downloadcuberite-028a35ef0d4719e56a5bcc1a3f2a780128498f5d.tar
cuberite-028a35ef0d4719e56a5bcc1a3f2a780128498f5d.tar.gz
cuberite-028a35ef0d4719e56a5bcc1a3f2a780128498f5d.tar.bz2
cuberite-028a35ef0d4719e56a5bcc1a3f2a780128498f5d.tar.lz
cuberite-028a35ef0d4719e56a5bcc1a3f2a780128498f5d.tar.xz
cuberite-028a35ef0d4719e56a5bcc1a3f2a780128498f5d.tar.zst
cuberite-028a35ef0d4719e56a5bcc1a3f2a780128498f5d.zip
Diffstat (limited to 'src/Protocol/Protocol_1_9.h')
-rw-r--r--src/Protocol/Protocol_1_9.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Protocol/Protocol_1_9.h b/src/Protocol/Protocol_1_9.h
index 200f10004..d08b76755 100644
--- a/src/Protocol/Protocol_1_9.h
+++ b/src/Protocol/Protocol_1_9.h
@@ -51,9 +51,6 @@ public:
cProtocol_1_9_0(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
- /** Get the packet ID for a given packet */
- virtual UInt32 GetPacketId(eOutgoingPackets a_Packet) override;
-
/** Called when client sends some data: */
virtual void DataReceived(const char * a_Data, size_t a_Size) override;
@@ -186,6 +183,9 @@ protected:
/** Adds the received (unencrypted) data to m_ReceivedData, parses complete packets */
void AddReceivedData(const char * a_Data, size_t a_Size);
+ /** Get the packet ID for a given packet */
+ virtual UInt32 GetPacketId(eOutgoingPackets a_Packet) override;
+
/** Reads and handles the packet. The packet length and type have already been read.
Returns true if the packet was understood, false if it was an unknown packet. */
virtual bool HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType);
@@ -339,14 +339,16 @@ class cProtocol_1_9_4 :
public:
cProtocol_1_9_4(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
- virtual UInt32 GetPacketId(eOutgoingPackets a_Packet) override;
-
// cProtocol_1_9_2 overrides:
virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) override;
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
virtual void HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer) override;
+protected:
+
+ virtual UInt32 GetPacketId(eOutgoingPackets a_Packet) override;
+
} ;