Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delays; Events rarely get triggered #24

Open
NiklasDanz opened this issue Apr 22, 2018 · 0 comments
Open

Delays; Events rarely get triggered #24

NiklasDanz opened this issue Apr 22, 2018 · 0 comments

Comments

@NiklasDanz
Copy link

NiklasDanz commented Apr 22, 2018

When using the Socket.io Unity library events rarely get triggered and only a few of the messages sent from the server are recived.
I'm trying to send values of a potentiometer (between 0 and 99) to my clients. When I change the value, my ESP8266 and Socket.js browser client instantly show all the change in the values. (Notice the many occurances of the values 99 and 0). On the Unity side only a few of the value changes show up (no 0 or 99).

JS console (correct output)
bildschirmfoto 2018-04-23 um 00 48 49

Unity debugger (no 0 or 99 are logged)
bildschirmfoto 2018-04-23 um 00 48 20

What do I have to change in order to reliably recive all the values in Unity as well?

My code:

`// Node Server function

socket.on('ESPValueChanged', function(value){
io.sockets.emit('valueForUnity', value)
})
`

On the Unity side I'm just using the default code with socket.On('Socket.EVENT_MESSAGE'... to log all of the incoming messages. The function call is inside of the DoOpen-function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant