question

brendan avatar image
brendan asked

dealing with dropped connection in client API

richjoslin
started a topic on Thu, 23 October 2014 at 6:56 PM

Does the client API automatically handle a dropped Internet connection?

If so, how?

If not, what should I do with the PlayFab API when I detect a dropped connection?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Best Answer
Brendan Vanous said on Fri, 24 October 2014 at 5:29 PM

The client API is just a wrapper around our Web API, and therefore does not do anything to handle the dropped Internet connection. To handle offline usage you will need to do your own offline caching. This is hard for us to anticipate how you want to handle, since every game is different. If you try to use our API, and there is no Internet connection, then presumably the Unity Web object which we use to do the HTTP calls will return an error that you'll need to catch and handle -- either by retrying when the connection comes back, or moving into an offline mode.


1 Comment
Brendan Vanous said on Fri, 24 October 2014 at 5:29 PM

The client API is just a wrapper around our Web API, and therefore does not do anything to handle the dropped Internet connection. To handle offline usage you will need to do your own offline caching. This is hard for us to anticipate how you want to handle, since every game is different. If you try to use our API, and there is no Internet connection, then presumably the Unity Web object which we use to do the HTTP calls will return an error that you'll need to catch and handle -- either by retrying when the connection comes back, or moving into an offline mode.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.