Hosts a new multiplayer session.
Overload List
| 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
| ArgumentOutOfRangeException |
One of the following conditions is true:
- maxGamers is not in the range of gamers that are supported in a network session. The XNA Framework supports multiplayer sessions between two and 31 players in a session for a Windows or an Xbox 360 game.
- privateGamerSlots is less than 0 or greater than maximumGamers.
|
| InvalidOperationException |
One of the following conditions is true:
A different session already exists. There can be only one NetworkSession or AvailableNetworkSessionCollection in use at a time. You must dispose any previous session before you create a new one.
One of the following methods has been called, but has not yet returned results:
Note that you must wait for any of these methods to return before you can create a new network session. To support this, you may use the asynchronous methods BeginCreate, BeginFind, BeginJoin, and the corresponding EndCreate, EndFind, EndJoin methods to detect when the operation is complete.
|
| ObjectDisposedException |
This NetworkSession is disposed. |
See Also
Reference
NetworkSession Class
NetworkSession Members
Microsoft.Xna.Framework.Net Namespace