From 0b45b439bcdc2769b747867894f46a9fd8c3d355 Mon Sep 17 00:00:00 2001 From: deathcap Date: Sat, 23 Jan 2016 19:29:27 -0800 Subject: [PATCH] Use symbolic values for writeAck() phase --- examples/client_forge/client_forge.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/client_forge/client_forge.js b/examples/client_forge/client_forge.js index d4aea22..0f0b079 100644 --- a/examples/client_forge/client_forge.js +++ b/examples/client_forge/client_forge.js @@ -248,7 +248,7 @@ function fmlHandshakeStep(client, data) channel: 'FML|HS', data: modList }); - writeAck(client, 2); // WAITINGSERVERDATA + writeAck(client, FMLHandshakeClientState.WAITINGSERVERDATA); client.fmlHandshakeState = FMLHandshakeClientState.WAITINGSERVERDATA; break; } @@ -270,7 +270,7 @@ function fmlHandshakeStep(client, data) if (parsed.data.hasMore === false) { console.log('LAST RegistryData'); - writeAck(client, 3); // WAITINGSERVERCOMPLETE + writeAck(client, FMLHandshakeClientState.WAITINGSERVERCOMPLETE); client.fmlHandshakeState = FMLHandshakeClientState.PENDINGCOMPLETE; } break; @@ -280,7 +280,7 @@ function fmlHandshakeStep(client, data) { assert.ok(parsed.data.discriminator === 'HandshakeAck', `expected HandshakeAck in PENDINGCOMPLETE, got ${parsed.data.discrimnator}`); assert.ok(parsed.data.phase === 2, `expected HandshakeAck phase WAITINGACK, got ${parsed.data.phase}`); - writeAck(client, 4); // PENDINGCOMPLETE + writeAck(client, FMLHandshakeClientState.PENDINGCOMPLETE4); client.fmlHandshakeState = FMLHandshakeClientState.COMPLETE break; } @@ -289,7 +289,7 @@ function fmlHandshakeStep(client, data) { assert.ok(parsed.data.phase === 3, `expected HandshakeAck phase COMPLETE, got ${parsed.data.phase}`); - writeAck(client, 5); // COMPLETE + writeAck(client, FMLHandshakeClientState.COMPLETE); console.log('HandshakeAck Complete!'); break; }