次の方法で共有


NetworkSession.Create Method

Hosts a new multiplayer session.

Overload List

Name Description
NetworkSession.Create (NetworkSessionType, Generic IEnumerable, Int32, Int32, NetworkSessionProperties) Starts hosting a new multiplayer session.
NetworkSession.Create (NetworkSessionType, Int32, Int32) Starts hosting a new multiplayer session.
NetworkSession.Create (NetworkSessionType, Int32, Int32, Int32, NetworkSessionProperties) Starts hosting a new multiplayer session.

Exceptions

Exception type Condition
ArgumentOutOfRangeException One of the following conditions is true:
  • maxGamers is not in range of gamers that are supported in a network session. The XNA Framework supports multiplayer sessions between 2 and 31 players in a session for a Windows- or an Xbox 360-based game. On Zune, the XNA Framework supports a multiplayer session between 2 and 8 players in a session.
  • privateGamerSlots is less than 0 or greater than maximumGamers.
InvalidOperationException

One of the following conditions is true:

ObjectDisposedException This NetworkSession is disposed.

See Also

Reference

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