npm

Join us for the upcoming webinar, "Enterprise JavaScript done right: the tools you love, the security you need."Sign up here »

jsockbridge

1.0.2 • Public • Published

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

install

npm i jsockbridge

Downloadsweekly downloads

8

version

1.0.2

license

ISC

last publish

collaborators

  • avatar
Report a vulnerability