NetworkSession.Join Method
Joins an existing multiplayer session. This method blocks until the operation has completed.
Namespace: Microsoft.Xna.Framework.Net
Assembly: Microsoft.Xna.Framework.Net (in microsoft.xna.framework.net.dll)
Parameters
- availableSession
- Type: AvailableNetworkSession
An existing multiplayer session.
Return Value
Session joined by the gamer.
| Exception type | Condition |
|---|---|
| ArgumentNullException | availableSession is null. |
| ObjectDisposedException | availableSession is disposed. |
| NetworkSessionJoinException |
The session either is full, is not joinable, or cannot be found.
|
Use the Find or BeginFind methods to search for available sessions.
Behavior of Local Sessions
XNA Game Studio 3.0 introduces a change in the behavior of network sessions when local profiles sign out in the middle of a session. In previous versions of XNA Game Studio, a session ended whenever a player signed out. Now the session continues even if one or more profiles sign out. Signed-out players are removed from the session, but the session ends only if no suitable players remain in the session.