NetworkSession.JoinInvited Method

Joins the specified local gamers, along with the local machine, to an existing network session in response to an InviteAccepted notification event from a non-local session.
Dd254834.note(en-us,XNAGameStudio.41).gifNote
Use the NetworkSession.AddLocalGamer method to join players to a session in response to an InviteAccepted notification event for a session that already exists locally, as indicated by IsCurrentSession.

NameDescription
NetworkSession.JoinInvited (Generic IEnumerable) Joins the specified local gamers, along with the local machine, to an existing network session in response to an InviteAccepted notification event from a non-local session.
NetworkSession.JoinInvited (Int32) Joins the local machine to an existing network session in response to an InviteAccepted notification event from a non-local session.

Exception typeCondition
NetworkSessionJoinException The session either is full, is not joinable, or cannot be found.
  • If the session is full, the specified session does not have enough open slots for all the local gamers signed in to this machine.
  • If it is not joinable, you must wait for the host to return to the lobby before you can join it.
  • If it cannot be found, the session may have ended, or there may be no network connectivity between the local machine and session host.

This method blocks until the operation has completed. For an asynchronous version of this method, see BeginJoinInvited.

Community Additions

ADD
Show: