Photon Fusion 2.1.1

ReliableKey Struct Reference

Represents a reliable key structure used in the Fusion.Sockets namespace. More...

Public Member Functions

readonly override bool Equals (object obj)
 Returns true if obj is a ReliableKey and the Data is the same.
readonly bool Equals (ReliableKey other)
 Returns true if the Data is the same.
readonly override int GetHashCode ()
 Returns a hash based on the Data.
readonly void GetInts (out int key0, out int key1, out int key2, out int key3)
 Gets the key data as integers.
readonly void GetUlongs (out ulong key0, out ulong key1)
 Gets the key data as unsigned long integers.

Static Public Member Functions

static ReliableKey FromInts (int key0=0, int key1=0, int key2=0, int key3=0)
 Creates a ReliableKey from integer values.
static ReliableKey FromULongs (ulong key0=0, ulong key1=0)
 Creates a ReliableKey from unsigned long values.
static bool operator!= (ReliableKey a, ReliableKey b)
 Returns true if the Data is not the same.
static bool operator== (ReliableKey a, ReliableKey b)
 Returns true if the Data is the same.

Public Attributes

fixed byte Data [16]
 Fixed byte array to store the key data.

Detailed Description

Represents a reliable key structure used in the Fusion.Sockets namespace.

Member Function Documentation

◆ FromInts()

ReliableKey FromInts ( int key0 = 0,
int key1 = 0,
int key2 = 0,
int key3 = 0 )
static

Creates a ReliableKey from integer values.

Parameters
key0The first integer key.
key1The second integer key.
key2The third integer key.
key3The fourth integer key.
Returns
A new ReliableKey instance.

◆ FromULongs()

ReliableKey FromULongs ( ulong key0 = 0,
ulong key1 = 0 )
static

Creates a ReliableKey from unsigned long values.

Parameters
key0The first unsigned long key.
key1The second unsigned long key.
Returns
A new ReliableKey instance.

◆ GetInts()

readonly void GetInts ( out int key0,
out int key1,
out int key2,
out int key3 )

Gets the key data as integers.

Parameters
key0The first integer key.
key1The second integer key.
key2The third integer key.
key3The fourth integer key.

◆ GetUlongs()

readonly void GetUlongs ( out ulong key0,
out ulong key1 )

Gets the key data as unsigned long integers.

Parameters
key0The first unsigned long key.
key1The second unsigned long key.