共用方式為


NetworkSession.AllowJoinInProgress Property

Gets or sets whether join-in-progress is allowed. If the host enables this setting, new machines will be able to join at any time. The default value is false, indicating that join-in-progress is disabled. AllowJoinInProgress can be read by any machine in the session, but can only be changed by the host.

Namespace: Microsoft.Xna.Framework.Net
Assembly: Microsoft.Xna.Framework.Net (in microsoft.xna.framework.net.dll)

Syntax

public bool AllowJoinInProgress { get; set; }

Property Value

true to enable join-in-progress, false otherwise. The default value is false.

Exceptions

Exception type Condition
NotSupportedException Join-in-progress is not supported for multiplayer sessions of type NetworkSessionType.Ranked.
InvalidOperationException This session is not the host, and cannot change the value of AllowJoinInProgress.
ObjectDisposedException The session has been disposed.

Remarks

When join-in-progress is disabled (the default state), new machines are only able to join while the session is in the lobby. The session will not be visible to matchmaking queries while in the actual gameplay state.

See Also

Tasks

Joining an In-Progress Game

Reference

NetworkSession Class
NetworkSession Members
Microsoft.Xna.Framework.Net Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP