summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_8.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-07-18 20:22:28 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-07-18 20:23:10 +0200
commitbc1b70dcde4cf22ef52fe794125c533afcee2655 (patch)
tree316de008808cc998d995138fae944f4266e856fc /src/Protocol/Protocol_1_8.h
parentDelete duplicated status request handlers (diff)
downloadcuberite-bc1b70dcde4cf22ef52fe794125c533afcee2655.tar
cuberite-bc1b70dcde4cf22ef52fe794125c533afcee2655.tar.gz
cuberite-bc1b70dcde4cf22ef52fe794125c533afcee2655.tar.bz2
cuberite-bc1b70dcde4cf22ef52fe794125c533afcee2655.tar.lz
cuberite-bc1b70dcde4cf22ef52fe794125c533afcee2655.tar.xz
cuberite-bc1b70dcde4cf22ef52fe794125c533afcee2655.tar.zst
cuberite-bc1b70dcde4cf22ef52fe794125c533afcee2655.zip
Diffstat (limited to 'src/Protocol/Protocol_1_8.h')
-rw-r--r--src/Protocol/Protocol_1_8.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Protocol/Protocol_1_8.h b/src/Protocol/Protocol_1_8.h
index b62e3129f..e7686577f 100644
--- a/src/Protocol/Protocol_1_8.h
+++ b/src/Protocol/Protocol_1_8.h
@@ -34,7 +34,7 @@ public:
cProtocol_1_8_0(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
/** Called when client sends some data: */
- virtual void DataReceived(const char * a_Data, size_t a_Size) override;
+ virtual void DataReceived(cByteBuffer & a_Buffer, const char * a_Data, size_t a_Size) override;
/** Sending stuff to clients (alphabetically sorted): */
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity & a_Vehicle) override;
@@ -143,9 +143,6 @@ protected:
/** State of the protocol. 1 = status, 2 = login, 3 = game */
UInt32 m_State;
- /** Buffer for the received data */
- cByteBuffer m_ReceivedData;
-
bool m_IsEncrypted;
cAesCfb128Decryptor m_Decryptor;
@@ -155,7 +152,7 @@ protected:
cFile m_CommLogFile;
/** Adds the received (unencrypted) data to m_ReceivedData, parses complete packets */
- virtual void AddReceivedData(const char * a_Data, size_t a_Size);
+ virtual void AddReceivedData(cByteBuffer & a_Buffer, const char * a_Data, size_t a_Size);
/** Nobody inherits 1.8, so it doesn't use this method */
virtual UInt32 GetPacketID(ePacketType a_Packet) override;