Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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)
Syntax
public static NetworkSession Join (
AvailableNetworkSession availableSession
)
Parameters
- availableSession
Type: AvailableNetworkSession
An existing multiplayer session.
Return Value
Session joined by the gamer.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | availableSession is null. |
ObjectDisposedException | availableSession is disposed. |
NetworkSessionJoinException | The session either is full, is not joinable, or cannot be found.
|
Remarks
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.
See Also
Tasks
Finding and Joining a Network Session
Reference
NetworkSession Class
NetworkSession Members
Microsoft.Xna.Framework.Net Namespace
Platforms
Xbox 360, Windows 7, Windows Vista, Windows XP