| Index: pkg/mdns/lib/mdns.dart
|
| diff --git a/pkg/mdns/lib/mdns.dart b/pkg/mdns/lib/mdns.dart
|
| index 55682a7b4ca2c2360d0554cb504ef3c130f4e71f..81528137a8c00b5ad6621e12062e48d5f768bb5a 100644
|
| --- a/pkg/mdns/lib/mdns.dart
|
| +++ b/pkg/mdns/lib/mdns.dart
|
| @@ -11,6 +11,9 @@ import 'dart:typed_data';
|
|
|
| import 'package:mdns/src/native_extension_client.dart';
|
| import 'package:mdns/src/native_protocol_client.dart';
|
| +import 'package:mdns/src/constants.dart';
|
| +
|
| +export 'package:mdns/src/constants.dart' show RRType;
|
|
|
| /// Client for DNS lookup using the mDNS protocol.
|
| ///
|
| @@ -51,15 +54,17 @@ abstract class MDnsClient {
|
| ///
|
| /// If no answer has been received within the specified [timeout]
|
| /// this method will complete with the value `null`.
|
| - Future<InternetAddress> lookup(
|
| - String hostname, {Duration timeout: const Duration(seconds: 5)});
|
| + Stream<ResourceRecord> lookup(
|
| + int type,
|
| + String name,
|
| + {Duration timeout: const Duration(seconds: 5)});
|
| }
|
|
|
| // Simple standalone test.
|
| Future main(List<String> args) async {
|
| var client = new MDnsClient();
|
| await client.start();
|
| - var address = await client.lookup(args[0]);
|
| - client.stop();
|
| + ResourceRecord resource = await client.lookup(RRType.A, args[0]).first;
|
| print(address);
|
| + client.stop();
|
| }
|
|
|