Skip to content

Commit

Permalink
Merge pull request #53 from guyluz11/dev
Browse files Browse the repository at this point in the history
Fix for big log on windows [#45].
  • Loading branch information
git-elliot authored Aug 6, 2022
2 parents f36930d + 505806e commit b133943
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion network_tools/lib/src/mdns_scanner/mdns_scanner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,23 @@ class MdnsScanner {
) async {
final List<MdnsInfo> mdnsFoundList = [];

final MDnsClient client = MDnsClient();
final MDnsClient client = MDnsClient(
rawDatagramSocketFactory: (
dynamic host,
int port, {
bool? reuseAddress,
bool? reusePort,
int? ttl,
}) {
return RawDatagramSocket.bind(
host,
port,
reusePort: Platform.isWindows ? false : true,
ttl: ttl!,
);
},
);

await client.start();

await for (final PtrResourceRecord ptr in client.lookup<PtrResourceRecord>(
Expand Down

0 comments on commit b133943

Please sign in to comment.