TCPHeaderConfig.fromJson constructor
TCPHeaderConfig.fromJson(
- Object? json
Implementation
factory TCPHeaderConfig.fromJson(Object? json) {
final map = asJsonMap(json, 'tcp header');
final type = map['type'];
return switch (type is String ? type.toLowerCase() : '') {
'none' => const NoOpConnectionAuthenticator(),
'http' => Authenticator.fromJson(map),
_ => RawTCPHeaderConfig(map),
};
}