• I think what you want is simply:

    ws.on('message', function(msg) { LoopbackB.write(msg); });
    LoopbackB.on('data',function(msg) { ws.send(msg); });
    

    No function execution or anything.

About

Avatar for Gordon @Gordon started