Description
I am using crate to connect ws client to a device server using socket.io which is able to switch to websockets. I am connecting to device using url ws://ipaddress/socket.io/?EIO=3&transport=websocket
.
This connects fine and I am getting messages from the device but after about 80 seconds it receives a Close notification which I am unable to track down. If I connect via browser to device and connect using socket.io library the connection stays alive. In browser code (using socket.io) I am not specifically sending and packets to the device so am not sure if I am getting Close message due to me not sending any data to the device (device with socket server) or whether Close is generated on websocket Client side due to too infrequent messages (server sends message roughly every 20 seconds).
Should I be sending periodic messages to the server? Or is it due to infrequent messages from server (I don't think it is this).
Appreciate any feedback ideas - busy digging into info....