| BrainCloudServiceClientClient_EnableNetworkErrorMessageCachingAsync Method |
[This is preliminary documentation and is subject to change.]
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 and 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.
Namespace:
Ruyi.SDK.BrainCloudApi
Assembly:
SDK.Gen.ServiceAsync (in SDK.Gen.ServiceAsync.dll) Version: 0.9.3.3995
Syntax public Task Client_EnableNetworkErrorMessageCachingAsync(
bool enabled,
int clientIndex,
CancellationToken cancellationToken
)
Parameters
- enabled
- Type: SystemBoolean
True if message should be cached on timeout - clientIndex
- Type: SystemInt32
@BrainCloud_clientIndex_desc - cancellationToken
- Type: System.ThreadingCancellationToken
[Missing <param name="cancellationToken"/> documentation for "M:Ruyi.SDK.BrainCloudApi.BrainCloudService.Client.Client_EnableNetworkErrorMessageCachingAsync(System.Boolean,System.Int32,System.Threading.CancellationToken)"]
Return Value
Type:
Task[Missing <returns> documentation for "M:Ruyi.SDK.BrainCloudApi.BrainCloudService.Client.Client_EnableNetworkErrorMessageCachingAsync(System.Boolean,System.Int32,System.Threading.CancellationToken)"]
See Also