1
0

Handle incomplete packets in cProtocolRecognizer

This commit is contained in:
peterbell10
2017-07-17 00:19:09 +01:00
committed by Tiger Wang
parent 87af95b67c
commit e0a44fb3bc
2 changed files with 61 additions and 47 deletions

View File

@@ -143,8 +143,6 @@ public:
virtual void SendData(const char * a_Data, size_t a_Size) override;
void SendPingStatusResponse(void);
protected:
/** The recognized protocol */
cProtocol * m_Protocol;
@@ -155,6 +153,9 @@ protected:
/** Is a server list ping for an unrecognized version currently occuring? */
bool m_InPingForUnrecognizedVersion;
// Packet handlers while in status state (m_InPingForUnrecognizedVersion == true)
void HandlePacketStatusRequest();
void HandlePacketStatusPing();
/** Tries to recognize protocol based on m_Buffer contents; returns true if recognized */
bool TryRecognizeProtocol(void);