summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ProtocolRecognizer.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-01-17 16:13:32 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2021-01-19 10:54:58 +0100
commit49ef21d6505c76fb26d50c99934e801ba6016049 (patch)
tree85fb980259f4ae19fc66cba27bbba24f6ffc713c /src/Protocol/ProtocolRecognizer.h
parentcChunk: don't inherit from cChunkDef (#5106) (diff)
downloadcuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar
cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar.gz
cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar.bz2
cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar.lz
cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar.xz
cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar.zst
cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.zip
Diffstat (limited to 'src/Protocol/ProtocolRecognizer.h')
-rw-r--r--src/Protocol/ProtocolRecognizer.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/Protocol/ProtocolRecognizer.h b/src/Protocol/ProtocolRecognizer.h
index b19adaefe..56d5645c0 100644
--- a/src/Protocol/ProtocolRecognizer.h
+++ b/src/Protocol/ProtocolRecognizer.h
@@ -47,22 +47,17 @@ public:
private:
- /** Handles data reception in a newly-created client handle that doesn't yet have known protocol.
+ /** Handles data reception in a newly-created client handle that doesn't yet have a known protocol.
a_Data contains a view of data that were just received.
- Calls TryRecognizeProtocol to populate m_Protocol, and transitions to another mode depending on success. */
+ Tries to recognize a protocol, populate m_Protocol, and transitions to another mode depending on success. */
void HandleIncomingDataInRecognitionStage(cClientHandle & a_Client, std::string_view a_Data);
/** Handles and responds to unsupported clients sending pings. */
- void HandleIncomingDataInOldPingResponseStage(cClientHandle & a_Client, const std::string_view a_Data);
-
- /* Tries to recognize a protocol based on a_Data and m_Buffer contents.
- a_Data is replaced with a sub-view, with handshake packet removed. */
- void TryRecognizeProtocol(cClientHandle & a_Client, std::string_view & a_Data);
+ void HandleIncomingDataInOldPingResponseStage(cClientHandle & a_Client, std::string_view a_Data);
/** Tries to recognize a protocol in the lengthed family (1.7+), based on m_Buffer.
- The packet length and type have already been read, type is 0.
Returns a cProtocol_XXX instance if recognized. */
- std::unique_ptr<cProtocol> TryRecognizeLengthedProtocol(cClientHandle & a_Client, std::string_view & a_Data);
+ std::unique_ptr<cProtocol> TryRecognizeLengthedProtocol(cClientHandle & a_Client, std::string_view a_Data);
/** Sends one packet inside a cByteBuffer.
This is used only when handling an outdated server ping. */