Photon Fusion 2.0.8

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ReliableKey Struct Reference

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

Inherits IEquatable< ReliableKey >.

Public Member Functions

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

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. More...
 
static ReliableKey FromULongs (ulong key0=0, ulong key1=0)
 Creates a ReliableKey from unsigned long values. More...
 
static bool operator!= (ReliableKey a, ReliableKey b)
 Returns true if the Data is not the same. More...
 
static bool operator== (ReliableKey a, ReliableKey b)
 Returns true if the Data is the same. More...
 

Public Attributes

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

Static Public Attributes

const int SIZE = 16
 The size of the ReliableKey structure in bytes. More...
 

Detailed Description

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

Member Function Documentation

◆ Equals() [1/2]

readonly override bool Equals ( object  obj)

Returns true if obj is a ReliableKey and the Data is the same.

◆ Equals() [2/2]

readonly bool Equals ( ReliableKey  other)

Returns true if the Data is the same.

◆ FromInts()

static 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()

static 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.

◆ GetHashCode()

readonly override int GetHashCode ( )

Returns a hash based on the Data.

◆ 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.

◆ operator!=()

static bool operator!= ( ReliableKey  a,
ReliableKey  b 
)
static

Returns true if the Data is not the same.

◆ operator==()

static bool operator== ( ReliableKey  a,
ReliableKey  b 
)
static

Returns true if the Data is the same.

Member Data Documentation

◆ Data

fixed byte Data[16]

Fixed byte array to store the key data.

◆ SIZE

const int SIZE = 16
static

The size of the ReliableKey structure in bytes.