summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol.h')
-rw-r--r--src/Protocol/Protocol.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Protocol/Protocol.h b/src/Protocol/Protocol.h
index 41c461e76..743a73aba 100644
--- a/src/Protocol/Protocol.h
+++ b/src/Protocol/Protocol.h
@@ -48,6 +48,7 @@ typedef unsigned char Byte;
class cProtocol
{
public:
+
cProtocol(cClientHandle * a_Client) :
m_Client(a_Client),
m_OutPacketBuffer(64 KiB),
@@ -354,8 +355,9 @@ public:
Game = 3,
};
- /** Called when client sends some data */
- virtual void DataReceived(cByteBuffer & a_Buffer, const char * a_Data, size_t a_Size) = 0;
+ /** Called to process them, when client sends some data.
+ The protocol uses the provided buffers for storage and processing, and must have exclusive access to them. */
+ virtual void DataReceived(cByteBuffer & a_Buffer, ContiguousByteBuffer && a_Data) = 0;
// Sending stuff to clients (alphabetically sorted):
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity & a_Vehicle) = 0;