You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For an app currently I am building, all the devices on the same WIFI must connect to each other. So every device has a server and many clients to other devices. if a device lost the connections to the other devices because of any reason, I need to reestablish the connection as soon as it's possible. The other devices should be able to connect to this device, as well.
What's the best way to achieve this? Any code sample or any advice is highly appreciated.
Kind Regards
Can
The text was updated successfully, but these errors were encountered:
I hoped that it solves my problem, too. However, when I switch a device offline and wait for some time and then I go back online again, the client sockets on that device reconnects as expected. However the client sockets on other devices do not reconnect to this device. When I broadcast something from this device to other devices, they will not receive the message.
Hope I could explain it properly, if not, please let me know.
Okay, I have some questions to clarify the situations:
Do you use TCP sockets or WebSockets?
Does server closes socket connections when goes offline?
How exactly do you switch device offline, programmatically or just power off?
A see one obvious solution here: implement some kind of ping request from clients and specify queryTimeout parameter. But may bee there is some easier solution.
Hello Team,
I have the following question.
For an app currently I am building, all the devices on the same WIFI must connect to each other. So every device has a server and many clients to other devices. if a device lost the connections to the other devices because of any reason, I need to reestablish the connection as soon as it's possible. The other devices should be able to connect to this device, as well.
What's the best way to achieve this? Any code sample or any advice is highly appreciated.
Kind Regards
Can
The text was updated successfully, but these errors were encountered: