MDnsClient class

Client for DNS lookup and publishing using the mDNS protocol.

Users should call MDnsQuerier.start when ready to start querying and listening. MDnsQuerier.stop must be called when done to clean up resources.

This client only supports "One-Shot Multicast DNS Queries" as described in section 5.1 of RFC 6762.

Constructors

MDnsClient({RawDatagramSocketFactory rawDatagramSocketFactory = RawDatagramSocket.bind})
Create a new MDnsClient.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

allInterfacesFactory(InternetAddressType type) Future<Iterable<NetworkInterface>>
Find all network interfaces with an the InternetAddressType specified.
lookup<T extends ResourceRecord>(ResourceRecordQuery query, {Duration timeout = const Duration(seconds: 5)}) Stream<T>
Lookup a ResourceRecord, potentially from the cache.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start({InternetAddress? listenAddress, NetworkInterfacesFactory? interfacesFactory, int mDnsPort = mDnsPort, InternetAddress? mDnsAddress}) Future<void>
Start the mDNS client.
stop() → void
Stop the client and close any associated sockets.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited