summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol.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/Protocol.h
parentBroken (diff)
downloadcuberite-2b48f586aac6f15cb4e2c80bcf3a8eaeb8abda75.tar
cuberite-2b48f586aac6f15cb4e2c80bcf3a8eaeb8abda75.tar.gz
cuberite-2b48f586aac6f15cb4e2c80bcf3a8eaeb8abda75.tar.bz2
cuberite-2b48f586aac6f15cb4e2c80bcf3a8eaeb8abda75.tar.lz
cuberite-2b48f586aac6f15cb4e2c80bcf3a8eaeb8abda75.tar.xz
cuberite-2b48f586aac6f15cb4e2c80bcf3a8eaeb8abda75.tar.zst
cuberite-2b48f586aac6f15cb4e2c80bcf3a8eaeb8abda75.zip
Diffstat (limited to 'src/Protocol/Protocol.h')
-rw-r--r--src/Protocol/Protocol.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Protocol/Protocol.h b/src/Protocol/Protocol.h
index 303278fcc..22825bd2b 100644
--- a/src/Protocol/Protocol.h
+++ b/src/Protocol/Protocol.h
@@ -73,7 +73,8 @@ public:
// We send a kick packet in response to a process error
PacketProcessError,
NotCompleted,
- UnsupportedProtocol
+ UnsupportedProtocol,
+ BadCompression
};
cProtocol(AString a_LogID) :
@@ -181,6 +182,8 @@ public:
/** Returns the ServerID used for authentication through session.minecraft.net */
virtual AString GetAuthServerID(void) = 0;
+
+ // Handle the initial handshake packets, called by cProtocolRecognizer after recognising the packet
virtual cProtocolError HandleHandshake(cByteBuffer & a_ByteBuffer, std::vector<std::unique_ptr<cClientAction>> & a_Actions) WARN_UNUSED = 0;
protected:
@@ -204,11 +207,11 @@ protected:
/** A generic data-sending routine, all outgoing packet data needs to be routed through this so that descendants may override it. */
- //virtual void SendData(cByteBuffer & a_ByteBuffer, const char * a_Data, size_t a_Size) = 0;
+ //virtual void SendData(const char * a_Data, size_t a_Size) = 0;
/** Sends a single packet contained within the cPacketizer class.
The cPacketizer's destructor calls this to send the contained packet; protocol may transform the data (compression in 1.8 etc). */
- //virtual void SendPacket(cPacketizer & a_Packet) = 0;
+ virtual void SendPacket(cPacketizer & a_Packet) = 0;
/** The logfile where the comm is logged, when g_ShouldLogComm is true */
cFile m_CommLogFile;