Forum Discussion
jibbs63
5 years agoProtege
P2P how to handle internet loss
Hi,
I have my game setup (using UNITY) and running on PC ( and Quest ). My question is how do people usually handle when one player has their internet go out while in a match?
My game specifically only ever has 2 players, so if one players internet goes out I would expect the other player to be aware of that somehow and respond accordingly. I don't see the player getting any kind of event or notification or anything like that. Do I need to add a heartbeat that constantly pings the opponent and use that to determine the other player's internet went out? That seems like it would be build into the SDK, but perhaps not.
Thanks
Update for anyone seeing this. Apparently it is built into the SDK and both instances get the p2p disconnected event after about 10 seconds of no internet. I was previously testing it using two instances on the same computer and then blocking network traffic to one using my firewall. For some reason, that did not cause the disconnected event, even though I could not communicate between instances. I realized I was still able to ping the blocked instance though.
However, I tried using two different machines and I got the disconnection events as expected.
1 Reply
- jibbs63Protege
Update for anyone seeing this. Apparently it is built into the SDK and both instances get the p2p disconnected event after about 10 seconds of no internet. I was previously testing it using two instances on the same computer and then blocking network traffic to one using my firewall. For some reason, that did not cause the disconnected event, even though I could not communicate between instances. I realized I was still able to ping the blocked instance though.
However, I tried using two different machines and I got the disconnection events as expected.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 23 days ago