MultiplayerSession.SetHostDeviceToken(String) 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.
Sets the device token of the host to use in multiplayer transactions.
public void SetHostDeviceToken (string hostDeviceToken);
abstract member SetHostDeviceToken : string -> unit
override this.SetHostDeviceToken : string -> unit
Public Sub SetHostDeviceToken (hostDeviceToken As String)
Parameters
- hostDeviceToken
- String
The host device token.
Implements
Remarks
The host device token is set in the local cache of the session and written to the multiplayer session directory.
If the system or title calls SetHostDeviceToken and sets peer to host requirements with a call to MultiplayerSession.SetPeerToHostRequirements, the measuring stage of managed initialization assumes that the specified host is the correct host and only measures metrics to that host.
After calling this method, the caller must use MultiplayerService.WriteSessionAsync to write batched local changes to the service.If SetHostDeviceToken is called without calling WriteSessionAsync, it only changes the local session object but does not commit it to the service.