NetworkSession Members
The following tables list the members exposed by the NetworkSession type.
Public Fields
Name | Description | |
---|---|---|
MaxSupportedGamers | Maximum number of gamers supported in a session. |
Public Properties
Name | Description | |
---|---|---|
AllGamers | Gets the collection of gamers currently in the session. | |
AllowHostMigration | Gets or sets whether host migration is allowed. This can be read by any machine in the session, but can only be changed by the host. The default value is false indicating that host migration is disabled. | |
AllowJoinInProgress | Gets or sets whether join-in-progress is allowed. If the host enables this setting, new machines will be able to join at any time. The default value is false, indicating that join-in-progress is disabled. AllowJoinInProgress can be read by any machine in the session, but can only be changed by the host. | |
BytesPerSecondReceived | Gets a performance counter recording the amount of data being received from the network. | |
BytesPerSecondSent | Gets a performance counter recording the amount of data being sent over the network. | |
Host | Gets the current host of the multiplayer session. | |
IsDisposed | Gets a value that indicates whether the object is disposed. | |
IsEveryoneReady | Determines whether all gamers are ready to enter the session. | |
IsHost | Determines whether this machine is the session host. | |
LocalGamers | Get the collection of local gamers for a multiplayer session. | |
MaxGamers | Gets or sets the maximum number of players able to join this multiplayer session. | |
PrivateGamerSlots | Gets or sets the number of private slots reserved for gamers who join using an invitation. | |
RemoteGamers | Gets the collection of remote gamers for a multiplayer session. | |
SessionProperties | Gets any custom properties that have been attached to the session. | |
SessionState | Gets the current state of a multiplayer session. | |
SessionType | Gets the current multiplayer session type. | |
SimulatedLatency | Gets or sets the amount of simulated network latency. | |
SimulatedPacketLoss | Gets or sets the amount of simulated packet loss. |
Public Methods
Name | Description | |
---|---|---|
AddLocalGamer | Adds the specified local gamer profile to the network session. | |
BeginCreate | Overloaded. Starts hosting a new multiplayer session. | |
BeginFind | Overloaded. Starts a matchmaking query to search for available multiplayer sessions. | |
BeginJoin | Starts a join operation for the specified multiplayer session. | |
BeginJoinInvited | Overloaded. Starts joining an existing network session in response to an InviteAccepted notification event. Call EndJoinInvited to access the asynchronous method results. | |
Create | Overloaded. Hosts a new multiplayer session. | |
Dispose | Ends the current multiplayer session. | |
EndCreate | Gets the result from a BeginCreate asynchronous call. | |
EndFind | Gets the result from a BeginFind asynchronous call. | |
EndGame | Changes the session state from NetworkSessionState.Playing to NetworkSessionState.Lobby. | |
EndJoin | Gets the result from a BeginJoin asynchronous call. | |
EndJoinInvited | Gets the result from a BeginJoinInvited asynchronous call. | |
Equals | (Inherited from Object.) | |
Find | Overloaded. Issues a matchmaking query, searching for available multiplayer sessions. | |
FindGamerById | Looks up the network gamer with the specified ID. | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
Join | Joins an existing multiplayer session. | |
JoinInvited | Overloaded. Joins an existing network session in response to an InviteAccepted notification event. | |
ReferenceEquals | (Inherited from Object.) | |
ResetReady | Resets the IsReady property of all session gamers. | |
StartGame | Changes the session state from NetworkSessionState.Lobby to NetworkSessionState.Playing. | |
ToString | (Inherited from Object.) | |
Update | Updates the state of the multiplayer session. |
Protected Methods
Name | Description | |
---|---|---|
Finalize | Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. | |
MemberwiseClone | (Inherited from Object.) |
Public Events
Name | Description | |
---|---|---|
GameEnded | Occurs when the game moves from gameplay to the lobby. | |
GamerJoined | Occurs when a new player joins a multiplayer session. | |
GamerLeft | Occurs when a player leaves the multiplayer session. | |
GameStarted | Occurs when the game moves from the lobby into actual gameplay. | |
HostChanged | Occurs when the session host has changed. | |
InviteAccepted | Event that occurs when a user has accepted an invite to join a network session. | |
SessionEnded | Occurs when the multiplayer session ends. |