summaryrefslogtreecommitdiffstats
path: root/src/Protocol/LengthenedProtocol.h
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-11-08 22:19:20 +0100
committertycho <work.tycho@gmail.com>2015-12-18 19:14:34 +0100
commit2b48f586aac6f15cb4e2c80bcf3a8eaeb8abda75 (patch)
tree72623b02dd7039a1218f082ba096a1b2134a16f2 /src/Protocol/LengthenedProtocol.h
parentBroken (diff)
downloadcuberite-ProtocolRefactor.tar
cuberite-ProtocolRefactor.tar.gz
cuberite-ProtocolRefactor.tar.bz2
cuberite-ProtocolRefactor.tar.lz
cuberite-ProtocolRefactor.tar.xz
cuberite-ProtocolRefactor.tar.zst
cuberite-ProtocolRefactor.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/LengthenedProtocol.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Protocol/LengthenedProtocol.h b/src/Protocol/LengthenedProtocol.h
index a6e72fe05..3f1a89a66 100644
--- a/src/Protocol/LengthenedProtocol.h
+++ b/src/Protocol/LengthenedProtocol.h
@@ -2,6 +2,8 @@
#pragma once
#include "Protocol.h"
+
+class cDataSender;
extern void undefined();
class cLengthenedProtocol : public cProtocol
@@ -19,11 +21,26 @@ public:
cProtocolError HandleHandshake(cByteBuffer & a_ByteBuffer, std::vector<std::unique_ptr<cClientAction>> & a_Actions) override WARN_UNUSED;
protected:
+
+
+ /** State of the protocol. 1 = status, 2 = login, 3 = game */
+ UInt32 m_State;
+
virtual cProtocolError DataReceived(const char * a_Data, size_t a_Size, std::vector<std::unique_ptr<cClientAction>> & a_Actions) override WARN_UNUSED;
/** This method should append the actions from incoming packets to a_Action */
virtual cProtocolError OnDataAddedToBuffer(cByteBuffer & a_Buffer, std::vector<std::unique_ptr<cClientAction>> & a_Action) WARN_UNUSED = 0;
+ virtual void SendData(const char * a_Data, size_t a_Size) = 0;
+
+ cDataSender * m_Sender;
+
private:
+
+ AString m_ServerAddress;
+
+ UInt16 m_ServerPort;
+
+ bool m_ShouldAllowBungeeCord;
/** Buffer for the received data */
cByteBuffer m_ReceivedData;