From 70a4ca5bc196676e8926028b2187fe7bd2874d42 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 17 Aug 2012 10:18:07 +0000 Subject: Packets now parse themselves from a cByteBuffer object (1st part of packeting rewrite, http://forum.mc-server.org/showthread.php?tid=524 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@744 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cClientHandle.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/cClientHandle.h') diff --git a/source/cClientHandle.h b/source/cClientHandle.h index 790bcc5b2..aee835337 100644 --- a/source/cClientHandle.h +++ b/source/cClientHandle.h @@ -39,6 +39,7 @@ #include "packets/cPacket_WindowClose.h" #include "packets/cPacket_UpdateSign.h" #include "packets/cPacket_Ping.h" +#include "ByteBuffer.h" @@ -100,6 +101,8 @@ public: bool IsPlaying(void) const {return (m_State == csPlaying); } void Send(const cPacket & a_Packet, ENUM_PRIORITY a_Priority = E_PRIORITY_NORMAL); + + void SendDisconnect(const AString & a_Reason); const AString & GetUsername(void) const; //tolua_export @@ -122,11 +125,11 @@ private: static const int GENERATEDISTANCE = 2; // Server generates this many chunks AHEAD of player sight. 2 is the minimum, since foliage is generated 1 step behind chunk terrain generation - int m_ProtocolVersion; + int m_ProtocolVersion; AString m_Username; AString m_Password; - AString m_ReceivedData; // Accumulator for the data received from the socket, waiting to be parsed; accessed from the cSocketThreads' thread only! + cByteBuffer m_ReceivedData; // Accumulator for the data received from the socket, waiting to be parsed; accessed from the cSocketThreads' thread only! cCriticalSection m_CSPackets; PacketList m_PendingNrmSendPackets; -- cgit v1.2.3