NOW LOADING

MidiRtpHostKnownClientsConfig


The allow and deny decisions saved for an RTP-MIDI host
Namespace Windows.Devices.Midi2.Transports.Rtp
Type Name MidiRtpHostKnownClientsConfig
Type WinRT Runtime Class
Implements IMidiServiceTransportPluginConfig 
IDL MidiRtpHostKnownClientsConfig.idl

Pass this to MidiServiceTransportPluginConfigManager.SaveUpdate, so a host’s allow and deny decisions are kept after the service restarts.

Constructors

Constructor Description
MidiRtpHostKnownClientsConfig() Creates an empty configuration
MidiRtpHostKnownClientsConfig(hostId) Creates a configuration for this host

Properties

Property Description
HostId The GUID of the host entry these decisions belong to
KnownClients Every MidiRtpKnownRemoteClient the host has a decision for

Remarks

This is a saved record, not a command, so there’s nothing to send. The running service already has each decision from ApproveOrDenyRemoteClientConnectRequestAsync. It never saves them itself, and saving one of these is what keeps a decision after a restart.

KnownClients must hold every remote device for the host, not just the ones that changed. Both saved lists are replaced with what it holds. So start from MidiRtpSavedHost.KnownRemoteClients, change it, and save the whole thing. Leaving a remote device out is how you take back a decision.

Leaving a remote device out only changes what’s read the next time the service starts. To take the decision back in the running service too, call ForgetRemoteClientAsync. Otherwise, the old decision stays until the service restarts.

Saving an empty KnownClients clears both lists for the host.

The decisions are only used while their host is saved. If the host isn’t saved, SaveUpdate returns ErrorEntryNotSaved and writes nothing.

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.