Edit

Share via


MultiplayerSession.SetPeerToHostRequirements Method

Definition

Sets thresholds that apply to each connection between a host candidate and a session member.

public void SetPeerToHostRequirements (Windows.Foundation.TimeSpan latencyMaximum, uint bandwidthDownMinimumInKilobitsPerSecond, uint bandwidthUpMinimumInKilobitsPerSecond, Microsoft.Xbox.Services.Multiplayer.MultiplayMetrics hostSelectionMetric);
abstract member SetPeerToHostRequirements : Windows.Foundation.TimeSpan * uint32 * uint32 * Microsoft.Xbox.Services.Multiplayer.MultiplayMetrics -> unit
override this.SetPeerToHostRequirements : Windows.Foundation.TimeSpan * uint32 * uint32 * Microsoft.Xbox.Services.Multiplayer.MultiplayMetrics -> unit
Public Sub SetPeerToHostRequirements (latencyMaximum As TimeSpan, bandwidthDownMinimumInKilobitsPerSecond As UInteger, bandwidthUpMinimumInKilobitsPerSecond As UInteger, hostSelectionMetric As MultiplayMetrics)

Parameters

latencyMaximum
Windows.Foundation.TimeSpan

The maximum latency time, in milliseconds.

bandwidthDownMinimumInKilobitsPerSecond
UInt32

The minimum bandwidth, in kilobits per second, for information sent from the host to the session member.

bandwidthUpMinimumInKilobitsPerSecond
UInt32

The minimum bandwidth, in kilobits per second, for information sent from the session member to the host.

hostSelectionMetric
MultiplayMetrics

An enumeration value indicating the metric for the Xbox system to use in selecting a host.

Implements

Microsoft.Xbox.Services.Multiplayer.__IMultiplayerSessionPublicNonVirtuals.SetPeerToHostRequirements(Windows.Foundation.TimeSpan,System.UInt32,System.UInt32,Microsoft.Xbox.Services.Multiplayer.MultiplayMetrics)

Remarks

The system or title calls SetPeerToHostRequirements only when creating a new session. It accesses the MultiplayerPeerToHostRequirements Class.

After calling this method, the caller must use MultiplayerService.WriteSessionAsync to write batched local changes to the service.

Applies to