use protodef:

* move general datatypes to protodef along with their tests
* move states to states.js file
* use one protodef serializer by state and direction instead of one big serializer for everything (same thing for the deserializer)
* define a packet as a protodef type using a switch and a container, and adding each minecraft packet as a type (packet_ + name)
* use mapper type from protodef to convert id to name in packet definition
* use general string type : pstring
* divide by 10 the number of iteration in the benchmark to get back to a reasonable test execution time
This commit is contained in:
Romain Beaumont 2015-10-03 02:14:01 +02:00
parent 75303f412f
commit f45c6dff49
26 changed files with 169 additions and 1363 deletions
examples/server_helloworld

View file

@ -14,6 +14,10 @@ server.on('login', function(client) {
console.log('Connection closed', '(' + addr + ')');
});
client.on('error', function(error) {
console.log('Error:', error);
});
// send init data so client will start rendering world
client.write('login', {
entityId: client.id,