lltp
v1.0.16
Published
Encoding and decoding library of lltp protocol
Downloads
39
Readme
install
npm i lltpdescribe
According to the lltp protocol, encode and decode command messages
example
const commandCode = 1;
const payload = new Uint8Array(2);
const command = new Command(commandCode, payload);
unpack(command.pack());
const ping = new Ping();
unpack(ping.pack());
const pong = new Pong();
unpack(pong.pack());
const push = new Push(payload);
unpack(push.pack());
const subscribe = new Subscribe();
unpack(subscribe.pack());
const unSubscribe = new UnSubscribe();
unpack(unSubscribe.pack());