hdlc-rfc1662
v1.1.1
Published
HDLC is a Simple NodeJS HDLC library.
Readme
HDLC
Simple HDLC library using NodeJS.
Installation
$ npm install HDLCUsage
import HDLC
import { HDLC } from "hdlc";
const hdlc = new HDLC();Initialize
hdlc.init(sendbyte);
hdlc.eventEmitter.on('newFrame', router);
function sendbyte(data) {
console.log(data);
}
function router(frame) {
console.log(frame);
}To send
hdlc.sendFrame(messageBytes);To receive
hdlc.byteReceiver(messageFrame);