node-minecraft-protocol/examples
Romain Beaumont eb5764e7ab
fix autoversion in online mode.
Explanation:
in this specific case, we were changing the state of the client to hanshaking (in autoVersion.js) before a connection was made (using setSocket), the consequence is the serializer was already piped to the framer when setSocket was called, and setSocket doesn't unpipe before piping. The consequence of that was the framer was piped 2 times, the packet was sent 2 times and the server kicked us.
My solution is piping the serializer to the framer in Client constructor.
Then if the state is changed, it will anyway automatically unpipe before repiping.

Other places correctly unpipe before piping.

Autoversion is now the default in nmp too
2017-07-12 13:07:25 +02:00
..
client_auto fix autoversion in online mode. 2017-07-12 13:07:25 +02:00
client_channel add logic for custom channel, and corresponding examples 2016-08-10 19:27:50 +02:00
client_chat Fix client_chat example extra array iteration. Closes GH-343 2016-02-09 20:30:40 -08:00
client_custom_channel add logic for custom channel, and corresponding examples 2016-08-10 19:27:50 +02:00
client_custom_packets update to new minecraft-data protocol schema 2016-02-23 18:42:01 +01:00
client_echo Log when connection lost in client_echo example 2016-02-07 00:05:55 -08:00
proxy Merge pull request #392 from vimes1984/patch-2 2016-03-21 15:56:21 +01:00
server Remove client chat exclusion from server 2016-02-06 16:06:45 -08:00
server_channel add logic for custom channel, and corresponding examples 2016-08-10 19:27:50 +02:00
server_custom_channel add logic for custom channel, and corresponding examples 2016-08-10 19:27:50 +02:00
server_helloworld a few small changes to make the code better 2015-11-30 22:19:56 +01:00