NOW LOADING

MidiNetworkAdvertisedHostWatcher


Watches the network for Network MIDI 2.0 hosts appearing and disappearing
Namespace Windows.Devices.Midi2.Transports.Network
Type Name MidiNetworkAdvertisedHostWatcher
Type WinRT Runtime Class
IDL MidiNetworkAdvertisedHostWatcher.idl

A device watcher specialized for Network MIDI 2.0 hosts advertised over mDNS.

Static Methods

Static Method Description
Create() Create a watcher. Wire up the events before calling Start()

Properties

Property Description
EnumeratedHosts A map of device id to MidiNetworkAdvertisedHost for everything found so far
Status The underlying DeviceWatcherStatus

Methods

Method Description
Start() Begin watching
Stop() Stop watching

Events

Event Description
Added A host was discovered. Args are MidiNetworkAdvertisedHostAddedEventArgs
Removed A host went away. Args are MidiNetworkAdvertisedHostRemovedEventArgs
Updated An advertised host’s properties changed. Args are MidiNetworkAdvertisedHostUpdatedEventArgs
EnumerationCompleted The initial enumeration pass finished. Hosts may still be added afterwards
Stopped The watcher stopped

Remarks

EnumerationCompleted means the first pass is done, not that discovery is finished. Devices can appear at any time, so keep the watcher running rather than treating that event as a final list. mDNS discovery can take a noticeable time to settle.

Didn't find what you were looking for?

Windows MIDI Services is an open source project with all source available on GitHub. We have a great community on Discord as well. Between GitHub and Discord, you should find the information you are looking for.