Let me give a little background on what I am trying to accomplish.
I have a device(chip and pin Terminal) that has a local IP address, It has been programmed to rece
Have you tried to use like this:
var exampleSocket = new WebSocket('wss://IP:PORT', ['soap', 'xmpp']);
// When the connection is open, send some data to the server
exampleSocket.onopen = function () {
exampleSocket.send('05');
};
// Log errors
exampleSocket.onerror = function (error) {
console.log('WebSocket Error ' + error);
};
// Log messages from the server
exampleSocket.onmessage = function (e) {
console.log('Server: ' + e.data);
};
hope I could be helpfull!