Photon Fusion 2.0.4

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

Header for RPC messages. More...

Public Member Functions

override string ToString ()
 Returns a string that represents the current RpcHeader. More...
 

Static Public Member Functions

static RpcHeader Create (int staticRpcKey)
 Creates a new RpcHeader with the provided staticRpcKey. More...
 
static RpcHeader Create (NetworkId id, int behaviour, int method)
 Creates a new RpcHeader with the provided NetworkId, behaviour, and method. More...
 
static RpcHeader Read (byte *data, out int size)
 Reads the RpcHeader from the provided byte pointer. More...
 
static int ReadSize (byte *data)
 Reads the size of the RpcHeader from the provided byte pointer. More...
 
static int Write (RpcHeader header, byte *data)
 Writes the RpcHeader to the provided byte pointer. More...
 

Public Attributes

ushort Behaviour
 The behaviour associated with the RPC message. More...
 
ushort Method
 The method associated with the RPC message. More...
 
NetworkId Object
 The NetworkId of the object associated with the RPC message. More...
 

Static Public Attributes

const int SIZE = NetworkId.SIZE + 2 + 2
 The size of the RpcHeader structure in bytes. More...
 

Detailed Description

Header for RPC messages.

Member Function Documentation

◆ Create() [1/2]

static RpcHeader Create ( int  staticRpcKey)
static

Creates a new RpcHeader with the provided staticRpcKey.

Parameters
staticRpcKeyThe staticRpcKey associated with the RPC message.
Returns
Returns a new RpcHeader with the provided staticRpcKey.

◆ Create() [2/2]

static RpcHeader Create ( NetworkId  id,
int  behaviour,
int  method 
)
static

Creates a new RpcHeader with the provided NetworkId, behaviour, and method.

Parameters
idThe NetworkId of the object associated with the RPC message.
behaviourThe behaviour associated with the RPC message.
methodThe method associated with the RPC message.
Returns
Returns a new RpcHeader with the provided parameters.

◆ Read()

static RpcHeader Read ( byte *  data,
out int  size 
)
static

Reads the RpcHeader from the provided byte pointer.

Parameters
dataThe byte pointer to read the RpcHeader from.
sizeThe size of the RpcHeader structure in bytes.
Returns
Returns the RpcHeader read from the byte pointer.

◆ ReadSize()

static int ReadSize ( byte *  data)
static

Reads the size of the RpcHeader from the provided byte pointer.

Parameters
dataThe byte pointer to read the RpcHeader size from.
Returns
Returns the size of the RpcHeader structure in bytes.

◆ ToString()

override string ToString ( )

Returns a string that represents the current RpcHeader.

Returns
Returns a string that represents the current RpcHeader.

◆ Write()

static int Write ( RpcHeader  header,
byte *  data 
)
static

Writes the RpcHeader to the provided byte pointer.

Parameters
headerThe RpcHeader to write.
dataThe byte pointer to write the RpcHeader to.
Returns
Returns the size of the RpcHeader structure in bytes.

Member Data Documentation

◆ Behaviour

ushort Behaviour

The behaviour associated with the RPC message.

◆ Method

ushort Method

The method associated with the RPC message.

◆ Object

NetworkId Object

The NetworkId of the object associated with the RPC message.

◆ SIZE

const int SIZE = NetworkId.SIZE + 2 + 2
static

The size of the RpcHeader structure in bytes.