I have a packet, when viewed in hex is:
0A 00 2C 01 23 00 0C 00 B3 01
0A 00 is the length which is 10.
2C 01 is a identifier 12c or could be a decimal packet id.
23 00 is a version of dec 35.
0C 00 is another version which is dec 12.
b3 01 is 435.
Now I am using packet for nodejs.
http://bigeasy.github.io/node-packet/
I currently have this code,
parser.extract("b16 => length, b16 => id, b16 => clientVersion, b16 => updateVersion, b16 => dateVersion", function (record) {
console.log(record);
});
parser.parse(data);
These are the issues here, the extract returns
length: 2560, version: 11265... etc. ( which is all wrong )
Question is what is going wrong?
changing everything to b8 still gives me the correct length which is 10 but everything else is still wrong.