NetworkSession.BeginJoinInvited Method (Int32, AsyncCallback, Object)
Starts joining an existing network session in response to an InviteAccepted notification event. Call EndJoinInvited to access the asynchronous method results.
Namespace: Microsoft.Xna.Framework.Net
Assembly: Microsoft.Xna.Framework.Net (in microsoft.xna.framework.net.dll)
Syntax
public static IAsyncResult BeginJoinInvited (
int maxLocalGamers,
AsyncCallback callback,
Object asyncState
)
Parameters
- maxLocalGamers
Type: Int32
The number of local signed-in gamers to add to the network session when accepting the invite. This must be at least one, and can be as high as the limit imposed by the title or the platform. On Windows, this value must always be set to one. - callback
Type: AsyncCallback
Method to be called at the conclusion of the asynchronous operation. - asyncState
Type: Object
State of the asynchronous operation.
Return Value
An IAsyncResult used to track the progress of the method.
Exceptions
Exception type | Condition |
---|---|
ArgumentOutOfRangeException | maxLocalGamers must be between 1 and 4. |
Remarks
If there are fewer signed-in gamers than the number specified in maxLocalGamers, all currently available signed-in gamers are added. This method does not allow specifying particular signed-in gamers in the event that there are more local signed-in gamers than the number to add.
See Inviting Players to Join Your Game for more information about adding game invitation support to your title.
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