[Libwebsockets] Nodejs to libwebsockets

Paolo Denti paolo.denti at gmail.com
Thu Apr 4 06:08:05 CEST 2019

I am trying to migrate the code below, from node.js to libwebsockets (i
oversimplified it removing all the boilerplate code)
Basically I need to connect, send some data and stay connected, forever

I tried to find the closest option possible in the minimal examples but
actually I am not able to replicate the behavior using any of the existing

Could anyone point me to the right direction?


var Stomp = require('stompjs');

var connect_callback = function() {
    client.send("/ws/xx/yy/zz", {}, JSON.stringify({token: sample data""}));

var client = Stomp.overWS('wss://<my server>/<my websocket endpoint>');
client.connect({}, connect_callback);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20190403/ca925315/attachment.htm>

More information about the Libwebsockets mailing list