hdlc-rfc1662

1.1.1 • Public • Published

HDLC

Simple HDLC library using NodeJS.

Installation

$ npm install HDLC

Usage

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);

Readme

Keywords

Package Sidebar

Install

npm i hdlc-rfc1662

Weekly Downloads

0

Version

1.1.1

License

ISC

Unpacked Size

11.9 kB

Total Files

5

Last publish

Collaborators

  • burin.sapsiri