1.0.16 • Published 2 years ago
lltp v1.0.16
install
npm i lltp
describe
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());