mdns_dart library

A comprehensive mDNS (Multicast DNS) service discovery library for Dart.

This library provides complete mDNS functionality for service discovery and registration, ported from the proven HashiCorp Go implementation.

Features:

  • DNS message format handling with all record types
  • Service discovery with streaming APIs
  • Multi-interface network support
  • IPv4 and IPv6 support
  • Production-ready performance

Classes

AAAARecord
AAAA record (IPv6 address)
ARecord
A record (IPv4 address)
ByteDataReader
ByteDataWriter
DNSClass
DNS class types
DNSFlags
DNS message header flags
DNSHeader
DNS message header
DNSMessage
Represents a complete DNS message
DNSQuestion
DNS question section
DNSResourceRecord
Base class for DNS resource records
DNSType
DNS record types used in mDNS operations
MDNSClient
High-level mDNS client for service discovery
MDNSServer
mDNS server for advertising services on the network
MDNSServerConfig
mDNS server configuration
MDNSService
mDNS service implementation that can serve records for a named service
MultiServiceZone
Multi-service zone that can serve multiple services
NSECRecord
NSEC record (Next Secure)
PTRRecord
PTR record (pointer)
QueryParams
Parameters for customizing mDNS queries
QuerySession
Manages the state of an mDNS query session, stitching together fragmented records.
ServiceEntry
Represents a discovered service entry
SRVRecord
SRV record (service)
TXTRecord
TXT record (text data)
Zone
Interface for serving DNS records dynamically

Constants

defaultTTL → const int
Default TTL for mDNS records in seconds
ipv4mDNS → const String
mDNS multicast addresses and port
ipv6mDNS → const String
mDNSPort → const int