summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ForgeHandshake.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/ForgeHandshake.h')
-rw-r--r--src/Protocol/ForgeHandshake.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/Protocol/ForgeHandshake.h b/src/Protocol/ForgeHandshake.h
index 061369c15..7c3969b96 100644
--- a/src/Protocol/ForgeHandshake.h
+++ b/src/Protocol/ForgeHandshake.h
@@ -9,6 +9,10 @@
#include "../UUID.h"
#include "json/json.h"
+
+
+
+
// fwd:
class cClientHandle;
@@ -19,38 +23,32 @@ class cClientHandle;
class cForgeHandshake
{
public:
+
/** True if the client advertised itself as a Forge client. */
- bool m_IsForgeClient;
+ bool IsForgeClient;
- cForgeHandshake(cClientHandle * client);
+ cForgeHandshake();
/** Add the registered Forge mods to the server ping list packet. */
- void AugmentServerListPing(Json::Value & ResponseValue);
+ void AugmentServerListPing(cClientHandle & a_Client, Json::Value & ResponseValue);
/** Begin the Forge Modloader Handshake (FML|HS) sequence. */
- void BeginForgeHandshake(const AString & a_Name, const cUUID & a_UUID, const Json::Value & a_Properties);
+ void BeginForgeHandshake(cClientHandle & a_Client);
/** Send the ServerHello packet in the Forge handshake. */
- void SendServerHello();
+ void SendServerHello(cClientHandle & a_Client);
/** Process received data from the client advancing the Forge handshake. */
- void DataReceived(cClientHandle * a_Client, ContiguousByteBufferView a_Data);
+ void DataReceived(cClientHandle & a_Client, ContiguousByteBufferView a_Data);
private:
+
/** True if the Forge handshake is in an errored state. */
bool m_Errored;
- /** The client handle undergoing this Forge handshake. */
- cClientHandle * m_Client;
-
- /** Values saved from BeginForgeHandshake() for continuing the normal handshake after Forge completes. */
- AString m_Name;
- cUUID m_UUID;
- Json::Value m_Properties;
-
- void HandleClientHello(cClientHandle * a_Client, ContiguousByteBufferView a_Data);
- void HandleModList(cClientHandle * a_Client, ContiguousByteBufferView a_Data);
- void HandleHandshakeAck(cClientHandle * a_Client, ContiguousByteBufferView a_Data);
+ void HandleClientHello(cClientHandle & a_Client, ContiguousByteBufferView a_Data);
+ void HandleModList(cClientHandle & a_Client, ContiguousByteBufferView a_Data);
+ void HandleHandshakeAck(cClientHandle & a_Client, ContiguousByteBufferView a_Data);
/** Set errored state to prevent further handshake message processing. */
void SetError(const AString & message);