NetworkGamer.Id Property

Gets a unique identifier that can be used to refer to this gamer in network packets.

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

public byte Id { get; }

Property Value

A unique identifier that can be used to refer to this gamer in network packets.

This value is synchronized across all the machines in the session, so it can be used in situations where gamer A wants to send a packet to B, and the contents of this packet must refer to gamer C. Using the identifier is preferable to sending the index of the gamer within the session, because indices could change if gamers join or leave in mid session, but this id will always remain constant. To look up a gamer once you know their id, use FindGamerById.

Xbox 360, Windows XP SP2, Windows Vista, Zune

Community Additions

ADD
Show: