| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library mdns; | 5 library mdns; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 import 'dart:typed_data'; | 10 import 'dart:typed_data'; |
| 11 | 11 |
| 12 import 'package:mdns/src/native_extension_client.dart'; | 12 import 'package:mdns/src/native_extension_client.dart'; |
| 13 import 'package:mdns/src/native_protocol_client.dart'; | 13 import 'package:mdns/src/native_protocol_client.dart'; |
| 14 import 'package:mdns/src/constants.dart'; | 14 import 'package:mdns/src/constants.dart'; |
| 15 import 'package:mdns/src/packet.dart'; |
| 15 | 16 |
| 16 export 'package:mdns/src/constants.dart' show RRType; | 17 export 'package:mdns/src/constants.dart' show RRType; |
| 17 export 'package:mdns/src/packet.dart' show ResourceRecord; | 18 export 'package:mdns/src/packet.dart' show ResourceRecord; |
| 18 | 19 |
| 19 /// Client for DNS lookup using the mDNS protocol. | 20 /// Client for DNS lookup using the mDNS protocol. |
| 20 /// | 21 /// |
| 21 /// This client only support "One-Shot Multicast DNS Queries" as described in | 22 /// This client only support "One-Shot Multicast DNS Queries" as described in |
| 22 /// section 5.1 of https://tools.ietf.org/html/rfc6762 | 23 /// section 5.1 of https://tools.ietf.org/html/rfc6762 |
| 23 abstract class MDnsClient { | 24 abstract class MDnsClient { |
| 24 // Instantiate Client for DNS lookup using the mDNS protocol. | 25 // Instantiate Client for DNS lookup using the mDNS protocol. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 52 /// | 53 /// |
| 53 /// The [name] must be the fully qualified name (that is including | 54 /// The [name] must be the fully qualified name (that is including |
| 54 /// the domain '.local'); for example `printer.local`. | 55 /// the domain '.local'); for example `printer.local`. |
| 55 /// | 56 /// |
| 56 /// The stream is closed after the timeout is reached. | 57 /// The stream is closed after the timeout is reached. |
| 57 Stream<ResourceRecord> lookup( | 58 Stream<ResourceRecord> lookup( |
| 58 int type, | 59 int type, |
| 59 String name, | 60 String name, |
| 60 {Duration timeout: const Duration(seconds: 5)}); | 61 {Duration timeout: const Duration(seconds: 5)}); |
| 61 } | 62 } |
| OLD | NEW |