コード例 #1
0
 /// <summary>
 /// Enables the timeout message caching which is disabled by default.
 /// Once enabled, if a client side timeout is encountered
 /// (i.e. brainCloud server is unreachable presumably due to the client
 /// network being down) the SDK will do the following:
 ///
 /// 1 - cache the currently queued messages to brainCloud
 /// 2 - call the network error callback
 /// 3 - then expect the app to call either:
 ///     a) RetryCachedMessages() to retry sending to brainCloud
 ///     b) FlushCachedMessages() to dump all messages in the queue.
 ///
 /// Between steps 2 & 3, the app can prompt the user to retry connecting
 /// to brainCloud to determine whether to follow path 3a or 3b.
 ///
 /// Note that if path 3a is followed, and another timeout is encountered,
 /// the process will begin all over again from step 1.
 ///
 /// WARNING - the brainCloud SDK will cache *all* API calls sent
 /// when a timeout is encountered if this mechanism is enabled.
 /// This effectively freezes all communication with brainCloud.
 /// Apps must call either RetryCachedMessages() or FlushCachedMessages()
 /// for the brainCloud SDK to resume sending messages.
 /// ResetCommunication() will also clear the message cache.
 /// </summary>
 /// <param name="enabled">True if message should be cached on timeout</param>
 public void EnableNetworkErrorMessageCaching(bool enabled)
 {
     _comms.EnableNetworkErrorMessageCaching(enabled);
 }