toJson method

Map<String, dynamic> toJson()

Converts the config to a JSON representation.

Implementation

Map<String, dynamic> toJson() {
  return {
    'url': url,
    'connectionTimeout': connectionTimeout.inMilliseconds,
    'enableReconnection': enableReconnection,
    'maxReconnectionAttempts': maxReconnectionAttempts,
    'initialReconnectionDelay': initialReconnectionDelay.inMilliseconds,
    'maxReconnectionDelay': maxReconnectionDelay.inMilliseconds,
    'backoffMultiplier': backoffMultiplier,
    'enableMessageQueue': enableMessageQueue,
    'maxQueueSize': maxQueueSize,
    'heartbeatInterval': heartbeatInterval.inMilliseconds,
    'enableHeartbeat': enableHeartbeat,
    'headers': headers,
    'protocols': protocols,
    'enableCompression': enableCompression,
  };
}