toJson method
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,
};
}