KCPConfig.fromJson constructor
KCPConfig.fromJson(
- Object? json
Implementation
factory KCPConfig.fromJson(Object? json) {
final map = asJsonMap(json, 'kcp settings');
return KCPConfig(
mtu: map['mtu'] as int?,
tti: map['tti'] as int?,
upCap: map['uplinkCapacity'] as int?,
downCap: map['downlinkCapacity'] as int?,
cwndMultiplier: map['cwndMultiplier'] as int?,
maxSendingWindow: map['maxSendingWindow'] as int?,
header: map['header'] == null
? null
: asJsonMap(map['header'], 'kcp header'),
seed: map['seed'] as String?,
);
}