mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
Merge pull request #321 from deathcap/remove-es7
Remove experimental ES7 features, use only standard ES6
This commit is contained in:
commit
16a5c0fc0d
3 changed files with 18 additions and 21 deletions
|
@ -3,7 +3,6 @@ var gulp = require('gulp');
|
|||
var plumber = require('gulp-plumber');
|
||||
var babel = require('gulp-babel');
|
||||
var options = {
|
||||
stage: 0, // Dat ES7 goodness
|
||||
optional: ["runtime"]
|
||||
};
|
||||
|
||||
|
|
|
@ -10,26 +10,25 @@ var createDeserializer=require("./transforms/serializer").createDeserializer;
|
|||
|
||||
class Client extends EventEmitter
|
||||
{
|
||||
packetsToParse={};
|
||||
serializer;
|
||||
compressor=null;
|
||||
framer=framing.createFramer();
|
||||
cipher=null;
|
||||
decipher=null;
|
||||
splitter=framing.createSplitter();
|
||||
decompressor=null;
|
||||
deserializer;
|
||||
isServer;
|
||||
version;
|
||||
protocolState=states.HANDSHAKING;
|
||||
ended=true;
|
||||
latency=0;
|
||||
|
||||
constructor(isServer,version) {
|
||||
super();
|
||||
this.version=version;
|
||||
this.isServer = !!isServer;
|
||||
this.setSerializer(states.HANDSHAKING);
|
||||
this.packetsToParse={};
|
||||
this.serializer;
|
||||
this.compressor=null;
|
||||
this.framer=framing.createFramer();
|
||||
this.cipher=null;
|
||||
this.decipher=null;
|
||||
this.splitter=framing.createSplitter();
|
||||
this.decompressor=null;
|
||||
this.deserializer;
|
||||
this.isServer;
|
||||
this.version;
|
||||
this.protocolState=states.HANDSHAKING;
|
||||
this.ended=true;
|
||||
this.latency=0;
|
||||
|
||||
this.on('newListener', function(event, listener) {
|
||||
var direction = this.isServer ? 'toServer' : 'toClient';
|
||||
|
|
|
@ -5,14 +5,13 @@ var states = require("./states");
|
|||
|
||||
class Server extends EventEmitter
|
||||
{
|
||||
socketServer=null;
|
||||
cipher=null;
|
||||
decipher=null;
|
||||
clients={};
|
||||
|
||||
constructor(version) {
|
||||
super();
|
||||
this.version=version;
|
||||
this.socketServer=null;
|
||||
this.cipher=null;
|
||||
this.decipher=null;
|
||||
this.clients={};
|
||||
}
|
||||
|
||||
listen(port, host) {
|
||||
|
|
Loading…
Reference in a new issue