B4J Question [IOT]how to connect to a secure websocket server

Michael1968

Active Member
Licensed User
Longtime User
hi all,
I want to connect to a securewebsocket server,how can i write this in B4J
Example code:

B4X:
var ws = new WebSocket('wss://iot.seeed.cc/v1/node/event');
ws.onopen = function() {
ws.send("d6d68b4b6b43f213569f5832dd8277b2");
};
ws.onmessage = function (evt) {
alert(evt.data);
};

    The event data format like this:

    {"event_name_here":"event_data_here"}

I want access to a node over internet using this API:
http://seeed-studio.github.io/Wio_Link/#preface

I use securewebsocket with no success

thx
Michael
 
Top