Commit graph

29 commits

Author SHA1 Message Date
Romain Beaumont
917b6adda1 enable cross version with an option in createClient and createServer :
* put parsePacketData in deserializer and createPacketBuffer in serializer
* remove packets from the index and expose readPacket instead
* load packets when needed in various files
* make tests test every supported version
static cross version of #234, fix #65, fix #240
2015-09-29 22:44:28 +02:00
Romain Beaumont
fdc24cbeed Kick client when he is using the wrong version of the client, fix #209 2015-09-24 00:04:13 +02:00
Romain Beaumont
68c589a3b0 move getter and setter after the constructor in client.js 2015-09-23 21:03:07 +02:00
Romain Beaumont
bbde23bb02 use es6 properties for client.js
see https://github.com/jeffmo/es-class-properties and http://odetocode.com/blogs/scott/archive/2014/10/14/features-of-es6-part-9-classes.aspx
2015-09-23 21:01:38 +02:00
Romain Beaumont
4e9d8e06c9 transform client.js into an es6 class 2015-09-20 21:12:56 +02:00
roblabla
b85fa944d7 Remove on(id), on([state;id]) and onRaw 2015-09-20 00:55:29 +02:00
roblabla
b1441098f9 Only allow writing by packetName. Refactor whole internals to use packetNames 2015-09-20 00:55:29 +02:00
roblabla
79ded321bf Add extend type support 2015-09-03 13:05:11 +00:00
Romain Beaumont
3892fb6de3 bump minecraft data : now multi version support 2015-08-21 16:19:46 +02:00
Romain Beaumont
6b6303b853 use protocol.json from minecraft-data
fix #163
2015-08-01 20:13:32 +02:00
Romain Beaumont
1a9e08cbd8 move createPacketBuffer and parsePacketData functions to serializer, also move protocol's exports to serializer 2015-05-23 03:31:47 +02:00
roblabla
2b1a0f86cd Improved error handling 2015-05-22 23:43:32 +00:00
Romain Beaumont
3c61f24991 remove write callback
knowing when the packet has been sent is not an useful information : the fact that it's sent doesn't mean it is received and what we usually want is that the packets are in the proper order no when they are sent
2015-05-23 01:10:58 +02:00
roblabla
f6a16bfdff Reintroduce packetsToParse 2015-05-22 22:25:12 +00:00
roblabla
64f24858dd Fix writing packets by name or [state,id] 2015-05-22 22:24:47 +00:00
roblabla
f5dda55f81 Reintroduce writeRaw 2015-05-22 19:22:21 +00:00
roblabla
17dea74357 Rewrite of the internal serializer using transform streams 2015-05-21 20:35:03 +00:00
Romain Beaumont
6446b205f0 add callback to write (socket.write *is* async) fix #168 2015-05-18 19:01:23 +02:00
Romain Beaumont
8a6a9c00e9 fix compressPacketBuffer : it was not compressing anything until now, also fix a problem in newStylePacket to handle the correct dataSize 2015-05-18 18:24:10 +02:00
Romain Beaumont
1dec8ccffd fix indentation and a few other stuff webstorm felt like fixing (for example if (condition) -> if(condition) since that was the more frequent style in node-minecraft-protocol) 2015-05-14 22:08:49 +02:00
Romain Beaumont
778752f097 move packets reading to packets.js, remove some dead code 2015-05-13 15:15:16 +02:00
Romain Beaumont
78e70dad8e reorganize code a bit : debug code going to debug.js, put packets reading code in a function, add types using a addTypes function 2015-05-13 14:47:28 +02:00
roblabla
c034373da7 Revert "Fix stackoverflow in recursion"
This reverts commit 29302ad683.
2015-04-26 13:44:03 +00:00
roblabla
c2acd84f4c Revert "Let's use process.nextTick to avoid multiple gigs of ram usage :D"
This reverts commit 4601abb333.
2015-04-26 13:43:56 +00:00
roblabla
4601abb333 Let's use process.nextTick to avoid multiple gigs of ram usage :D 2015-04-26 13:14:53 +00:00
roblabla
29302ad683 Fix stackoverflow in recursion 2015-04-26 13:03:28 +00:00
deathcap
bbbd022f33 Move network-specific code out of client.js 2015-03-28 23:24:23 -07:00
Will Franzen
4e32c12bfd Merge branch 'master' of https://github.com/PrismarineJS/node-minecraft-protocol into es6
Conflicts:
	.gitignore
	index.js
	package.json
2015-03-06 22:50:28 -06:00
Will Franzen
423305a19d Set up gulpp 2015-02-22 10:27:46 -06:00
Renamed from lib/client.js (Browse further)