WebSocketConfig.fromJson constructor
WebSocketConfig.fromJson(
- Object? json
Implementation
factory WebSocketConfig.fromJson(Object? json) {
final map = asJsonMap(json, 'websocket settings');
return WebSocketConfig(
host: map['host'] as String?,
path: map['path'] as String?,
headers: (map['headers'] as Map?)?.cast<String, String>(),
acceptProxyProtocol: map['acceptProxyProtocol'] as bool?,
heartbeatPeriod: map['heartbeatPeriod'] as int?,
);
}