DirectTCPSocketOptions.fromJson constructor
DirectTCPSocketOptions.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DirectTCPSocketOptions.fromJson(Map<String, dynamic> json) {
return DirectTCPSocketOptions(
noDelay: json['noDelay'] as bool? ?? false,
keepAliveDelay: json.containsKey('keepAliveDelay')
? json['keepAliveDelay'] as num
: null,
sendBufferSize: json.containsKey('sendBufferSize')
? json['sendBufferSize'] as num
: null,
receiveBufferSize: json.containsKey('receiveBufferSize')
? json['receiveBufferSize'] as num
: null,
dnsQueryType: json.containsKey('dnsQueryType')
? DirectSocketDnsQueryType.fromJson(json['dnsQueryType'] as String)
: null,
);
}