RealtimeWebSocketClient.getInstance constructor
RealtimeWebSocketClient.getInstance(
- CloudBaseCore core
Implementation
factory RealtimeWebSocketClient.getInstance(CloudBaseCore core) {
if (_client == null) {
_client = RealtimeWebSocketClient(
realtimePingInterval: 10000,
realtimePongWaitTimeout: 5000,
getAccessToken: () async {
assert(core.auth != null, "not auth cloudbase");
String accessToken = await core.auth!.getAccessToken();
return {'envId': core.config.envId, 'accessToken': accessToken};
},
);
}
return _client!;
}