jsockbridge
v1.0.2
Published
JSockBridge : Web Socket <--:bridge:--> TCP Socket
Downloads
4
Maintainers
Readme
Web Socket to TCP Socket bridge
Usage:
var jsockbridge=require(`jsockbridge`);
var bridge=jsockbridge({
port:18246,
pref:"bridge",
ondata:(type,msg)=>{
// console.log(`${type} : ${msg}`);
},
onopen:()=>{
console.log(`Bridge opened!`);
},
onclosed:()=>{
console.log(`Bridge closed!`);
}
});
ws://(ip):18246/bridge
First message sent to bridge must be:
init|:|(dest ip)|:|(dest port)
For example:
init|:|localhost|:|53840