AppRemoting.StartListeningForPlayer(RemotingListenConfiguration) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts listening with given Holographic Remoting remote app (Server) configuration and initializes XR.
public static void StartListeningForPlayer(Microsoft.MixedReality.OpenXR.Remoting.RemotingListenConfiguration listenConfiguration);
static member StartListeningForPlayer : Microsoft.MixedReality.OpenXR.Remoting.RemotingListenConfiguration -> unit
Public Shared Sub StartListeningForPlayer (listenConfiguration As RemotingListenConfiguration)
Parameters
- listenConfiguration
- RemotingListenConfiguration
The set of parameters to use for remoting.
Examples
private static System.Collections.IEnumerator MyListen(RemotingConnectConfiguration connectConfiguration)
{
// Change UX before remoting starts, e.g. display progress bar, hiding buttons
yield return AppRemoting.StartListeningForPlayer(listenConfiguration);
// Change UX after remoting complete, e.g. re-enable listen button.
}
Remarks
The remote app (Server) will be waiting for remote player (Client) to connect, and after a successful connection, XR experience starts. This method will return quickly and is safe for use in UI threads. Apps can use ConnectionState to monitor the ongoing connection. If the connection fails for any reason, it will retry listening for incoming connection until StopListening() or Disconnect() is called.