NetworkSession.BeginJoin Method

Starts a join operation for the specified multiplayer session.

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

Syntax

public static IAsyncResult BeginJoin (
         AvailableNetworkSession availableSession,
         AsyncCallback callback,
         Object asyncState
)

Parameters

  • availableSession
    Type: AvailableNetworkSession
    Session the gamer is attempting to join.
  • callback
    Type: AsyncCallback
    The method to be called once the asynchronous operation is finished.
  • asyncState
    Type: Object
    State of the asynchronous operation.

Return Value

An IAsyncResult used to track the progress of the method. Call EndJoin to access these results.

Exceptions

Exception type Condition
ArgumentNullException availableSession is null.
ObjectDisposedException availableSession is disposed.

See Also

Overview

Working with Asynchronous Methods in XNA Game Studio

Reference

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

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP