Sync Integration FAQ

The following will include some FAQ surrounding Skillz synchronous integration.

If you still have questions, please reach out to integrations@skillz.com

1. How long does it take for Skillz to recognize a player has lost connection?

When a player backgrounds the app, they are immediately disconnected rather than waiting 3s.

Both players are allowed a max of 3 seconds without direct communication with the server before they are considered disconnected. After 3 seconds, the server will timeout and disconnect the client and trigger a disconnect message to be sent to the connected player.

 

2. Why do I sometimes get that the opponent has reconnected multiple times?

Every time an opponent player connects to the server while the current player is connected, the server will send the current player a connection payload with all connected players.

 

3. Why does my opponent disconnected timer sometimes get stuck on 0 seconds for a long time?

Effectively, getTimeLeftForReconnection accounts for UI updates only (At worst, it may be stuck on 0 seconds for up to 30 seconds before onOpponentHasLeftMatch). The API call for onOpponentHasLeftMatch will only be triggered by a timeout message received from the server.

 

 

4. If both players disconnect, why does the opponent still have the full time left for reconnection?

The client manages a time tracker accounting for getTimeLeftForReconnection for all players in the match. The time left for an opponent player will not count down while the current player is disconnected, even if all players are disconnected at the same time.

 

5. Why does it sometimes seem like the timers are counting down at different speeds on different devices?

Each second of the 30 second timer corresponds to 1 second +/- processing time for each iteration of the client connection.

 

6. How does the client make sure that it retries to connect if it ever gets disconnected?

The current client automatically cycles through a Connecting > Timeout > Disconnect > Reconnect flow internally. If the current client cannot connect to the server within 3 seconds they will trigger the Timeout state and immediately enter Reconnect flow.

 

7. Why am I sometimes not able to connect to the server/ start the match even though I have good internet connection?

If the current client is able to connect to the server and remains connected, they will only be considered as connected if the server acknowledges the connection by sending the current client a connection message. These messages are triggered automatically on the server after a client connects. The current client defers to the server in determining its connected state.