ClientConfig constructor

ClientConfig({
  1. String token = '',
  2. ConnectionTokenCallback? getToken,
  3. List<int>? data,
  4. Map<String, dynamic> headers = const <String, dynamic>{},
  5. bool tlsSkipVerify = false,
  6. Duration timeout = const Duration(seconds: 10),
  7. Duration minReconnectDelay = const Duration(milliseconds: 500),
  8. Duration maxReconnectDelay = const Duration(seconds: 20),
  9. Duration maxServerPingDelay = const Duration(seconds: 10),
  10. String name = 'dart',
  11. String version = '',
})

Creates a new client configuration.

Note that headers are only used on platforms that support dart:io, so on web the headers will be ignored.

Implementation

ClientConfig({
  this.token = '',
  this.getToken,
  this.data,
  this.headers = const <String, dynamic>{},
  this.tlsSkipVerify = false,
  this.timeout = const Duration(seconds: 10),
  this.minReconnectDelay = const Duration(milliseconds: 500),
  this.maxReconnectDelay = const Duration(seconds: 20),
  this.maxServerPingDelay = const Duration(seconds: 10),
  this.name = 'dart',
  this.version = '',
});