From 68c589a3b0ca76374078fde04bf29e664c8fec75 Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Wed, 23 Sep 2015 21:03:07 +0200 Subject: [PATCH] move getter and setter after the constructor in client.js --- src/client.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/client.js b/src/client.js index c291333..b1bae1f 100644 --- a/src/client.js +++ b/src/client.js @@ -24,25 +24,6 @@ class Client extends EventEmitter deserializer; isServer; - get state(){ - return this.serializer.protocolState; - } - - set state(newProperty) { - var oldProperty = this.serializer.protocolState; - this.serializer.protocolState = newProperty; - this.deserializer.protocolState = newProperty; - this.emit('state', newProperty, oldProperty); - } - - get compressionThreshold() { - return this.compressor == null ? -2 : this.compressor.compressionThreshold; - } - - set compressionThreshold(threshold) { - this.setCompressionThreshold(threshold); - } - constructor(isServer) { super(); @@ -65,6 +46,25 @@ class Client extends EventEmitter }); } + get state(){ + return this.serializer.protocolState; + } + + set state(newProperty) { + var oldProperty = this.serializer.protocolState; + this.serializer.protocolState = newProperty; + this.deserializer.protocolState = newProperty; + this.emit('state', newProperty, oldProperty); + } + + get compressionThreshold() { + return this.compressor == null ? -2 : this.compressor.compressionThreshold; + } + + set compressionThreshold(threshold) { + this.setCompressionThreshold(threshold); + } + setSocket(socket) { var ended = false;