NetworkSession.MaxGamers Property

Gets or sets the maximum number of players able to join this multiplayer session.

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

Syntax

public int MaxGamers { get; set; }

Property Value

Maximum number of players supported by the multiplayer session. Only the host can modify this value.

Exceptions

Exception type Condition
ArgumentOutOfRangeException

MaxGamers must be between 2 and 31 players for Windows-based and Xbox 360-based games.

ObjectDisposedException

This NetworkSession is disposed.

InvalidOperationException

This NetworkSession is not the host; therefore, it cannot set the property MaxGamers.

Remarks

Bb975778.note(en-us,XNAGameStudio.41).gifWindows Specific Information

For Windows-based games, MaxGamers must be between 2 and 31, where 31 is the maximum number of players supported in a session.

Bb975778.note(en-us,XNAGameStudio.41).gifXbox 360 Specific Information

For Xbox 360-based games, MaxGamers must be between 2 and 31, where 31 is the maximum number of players supported in a session.

See Also

Reference

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

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP