struct PeerID
(Niantic.Lightship.SharedAR.Networking.PeerID)
Overview
Struct that represents the identifiers of other peers in the room. Can be compared with other PeerIDs and used as Keys in Dictionaries.
struct PeerID: IEquatable< PeerID > {
// fields
static PeerID InvalidID = new PeerID(0);
// properties
Guid Identifier;
// methods
PeerID(UInt32 id);
UInt32 ToUint32();
bool Equals(PeerID other);
override int GetHashCode();
override string ToString();
};
Detailed Documentation
Struct that represents the identifiers of other peers in the room. Can be compared with other PeerIDs and used as Keys in Dictionaries.
Fields
InvalidID
static PeerID InvalidID = new PeerID(0)
The Invalid peer ID returned by functions that have errored. This PeerID returns 0 from ToUint32.
Properties
Identifier
Guid Identifier
Guid representation of the PeerID.
Methods
PeerID
PeerID(UInt32 id)
Constructor for the PeerID. PeerIDs should be received from the INetworking API, not manually constructed.
ToUint32
UInt32 ToUint32()
UInt32 representation of the PeerID.
Equals
bool Equals(PeerID other)
Equality implementation for PeerID.
GetHashCode
override int GetHashCode()
Get unique hash for this PeerID. Necessary for Dictionary compatibility.
ToString
override string ToString()
String representation of the PeerID.