| Namespace | Windows.Devices.Midi2.Transports.Network |
|---|---|
| Type Name | MidiNetworkRemoteClientApprovalConfig |
| Type | WinRT Runtime Class |
| Implements | Windows.Devices.Midi2.ServiceConfig.IMidiServiceTransportPluginConfig |
| IDL | MidiNetworkRemoteClientApprovalConfig.idl |
Pass to MidiNetworkTransportManager.ApproveOrDenyRemoteClientConnectRequestAsync.
| Constructor | Description |
|---|---|
MidiNetworkRemoteClientApprovalConfig() |
Create an empty config |
MidiNetworkRemoteClientApprovalConfig(hostId, remoteClientName, remoteClientProductInstanceId, approve, restrictScopeToThisRequestOnly) |
Create a fully populated config |
| Property | Description |
|---|---|
HostId |
The GUID of the host the client is connecting to |
RemoteClientName |
The UMP Endpoint Name of the remote client, from MidiNetworkPendingRemoteClient |
RemoteClientProductInstanceId |
The Product Instance Id of the remote client |
Approve |
True to allow the connection, false to refuse it |
ScopeIsThisRequestOnly |
True to apply the decision only to the request in hand. False to remember it for future connections from the same client |
A remote client is identified by the RemoteClientName and RemoteClientProductInstanceId pair, never by address. A client may use a new source port for every session and its address can change, so an address is the wrong thing to approve.
When ScopeIsThisRequestOnly is false the service remembers the decision for as long as it runs, and the same client is allowed or refused without asking again. To make it survive a service restart, the calling application also writes the identity into the allowedClients or deniedClients list for that host in the configuration file. The service reads those lists at startup but never writes them.
