udp-radio
UDP based broadcasting and receiving module, It expects an JS Object and returns the same on the otherside
Instalation
$ npm install upd-radio
Usages
Requiring the package
const Radio = ;
Async receiving any broadcast
const BROADCAST_ADDR = "127.0.0.1";const BROADCAST_PORT = 9999let channel_0 = BROADCAST_ADDR BROADCAST_PORT { // on receiving of a radio broadcast console;}
Async send any broadcast
const message = _type: "LOGOUT" _content: oshostname;channel_0;channel_0;