Show / Hide Table of Contents

Class MdnsNext

Discovers peers using Multicast DNS according to https://github.com/libp2p/specs/blob/master/discovery/mdns.md

Inheritance
Object
Mdns
MdnsNext
Implements
IPeerDiscovery
IService
Inherited Members
Mdns.PeerDiscovered
Mdns.LocalPeer
Mdns.MulticastService
Mdns.ServiceName
Mdns.Broadcast
Mdns.StartAsync()
Mdns.StopAsync()
Mdns.OnServiceDiscovery(ServiceDiscovery)
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: PeerTalk.Discovery
Assembly: PeerTalk.dll
Syntax
public class MdnsNext : Mdns, IPeerDiscovery, IService

Constructors

| Improve this Doc View Source

MdnsNext()

Creates a new instance of the class. Sets the ServiceName to "_p2p._udp".

Declaration
public MdnsNext()

Methods

| Improve this Doc View Source

BuildProfile()

Build the profile which contains the DNS records that are needed to locate and connect to the local peer.

Declaration
public override ServiceProfile BuildProfile()
Returns
Type Description
ServiceProfile

Describes the service.

Overrides
Mdns.BuildProfile()
| Improve this Doc View Source

GetAddresses(Message)

Get the addresses of the peer in the DNS message.

Declaration
public override IEnumerable<MultiAddress> GetAddresses(Message message)
Parameters
Type Name Description
Makaretu.Dns.Message message

An answer describing a peer.

Returns
Type Description
IEnumerable<MultiAddress>

All the addresses of the peer.

Overrides
Mdns.GetAddresses(Message)
| Improve this Doc View Source

SafeLabel(String, Int32)

Creates a safe DNS label.

Declaration
public static string SafeLabel(string label, int maxLength = 63)
Parameters
Type Name Description
String label
Int32 maxLength
Returns
Type Description
String

Implements

IPeerDiscovery
IService
  • Improve this Doc
  • View Source
Back to top Generated by DocFX