ofxSocketIO
ofxSocketIO copied to clipboard
Event not fired after long period of time
I've set up a Socket.IO server which relay's messages from the client (mobile device) to an OF application. The communication works initially when the server is started, but after a time period (say, 12 hours) the communication fails from the server to the OF side. The client-server communication continues to report console.log statements from the server side but the OF app doesn't receive an event.
A paired down version of the code is available here: https://gist.github.com/eightlines/a5f57f7a61731a913cb3c0ff33081085
Hi @eightlines,
The server hangs up without any error ? Could you provide some logs by any chance ? What OS runs the OF app ?
In the meantime, I'll set up a test for a long period usage and see what I get.
By the way, by looking at your code sample, I'm guessing that you could be interested in the spacebro suite we are currently building. Spacebro is a socket.io server that handles redistribution of events that clients emits. It has an ofx client too. Everything is automatically connected through Avahi and mdns. We use it in production and it's working quite well, despite being still in an early development stage.
If you want to discuss about it we'd love to do so, but since this is not relevant to your issue we should just do this somewhere else.
I've got the server and OF app running on a RPi3 with Raspbian Jessie installed. (Linux raspberrypi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux) Node v6.0.0. OpenFrameworks 0.9.3. Express.js v4.13.4. Socket.io 1.4.5.
I was logging the cursor movement but after a longer duration I simply stop receiving the event notifications. Should the event listeners be removed if the OF app disconnects? (I'm not getting notifications that the app is disconnecting, just want to be thorough)
Thanks for letting me know about Spacebro, looking into it now. I should add I really like this add-on, when it works it works really well!
Hi @eightlines , I'm glad you like this addon. I understand you have an issue after a long period of time, which makes it hard to track. Can you try do run a simple example of socket.io-client-cpp on the RPi3? If you experience the same issue, it means it's an issue with the lib itself.
Thanks, e