Websockets client!

hmmm, post whole app, please

1 Like

I was with the same error and solved refreshing the page.

@ekbduffy:

IĀ“m trying to use nodejs + socket.io with your lib to share events between 2 sparkā€™s. It connects but how can i send events (see bellow) using this lib?

socket.on(ā€˜my-eventā€™, function (data) {
console.log(data);
});

Thank you.

Hello, just got a Photon. Iā€™m trying to use this library with the example code. Iā€™ve changed the URLs to ones matching my web app and deployed the code. The problem is that the LED on the Photon changes to a slowly green blinking light and the Photo becomes completely unresponsive. I have to factory reset it to be able to push code to the Photon again. Any idea what the problem could be?

This is probably what we call breathing green and it indicates that your code prevents the execution of the cloud houskeeping tasks by not falling out of loop() or calling Particle.process() often enough.

Hi @ekbduffy,

Are you still working on the websockets library? I have wondered through the community forum and your post was the only one dealing directly with websockets. I am actually looking for socket.io which runs on top of websockets, but websockets would suffice if the handshaking has been fixed.

Thx

Hello, nope. Iā€™ve stopped my work, since Iā€™ve faced a hudge slowdown in Particle Core during receiving messages from websockets server. Handshake is a big problem, it is need hashing as I remember. You are welcome to try fix it by youself :slight_smile: