Header for RPC messages.
More...
|
override string | ToString () |
| Returns a string that represents the current RpcHeader.
|
|
|
static RpcHeader | Create (int staticRpcKey) |
| Creates a new RpcHeader with the provided staticRpcKey.
|
|
static RpcHeader | Create (NetworkId id, int behaviour, int method) |
| Creates a new RpcHeader with the provided NetworkId, behaviour, and method.
|
|
static RpcHeader | Read (byte *data, out int size) |
| Reads the RpcHeader from the provided byte pointer.
|
|
static int | ReadSize (byte *data) |
| Reads the size of the RpcHeader from the provided byte pointer.
|
|
static int | Write (RpcHeader header, byte *data) |
| Writes the RpcHeader to the provided byte pointer.
|
|
|
ushort | Behaviour |
| The behaviour associated with the RPC message.
|
|
ushort | Method |
| The method associated with the RPC message.
|
|
NetworkId | Object |
| The NetworkId of the object associated with the RPC message.
|
|
|
const int | SIZE = NetworkId.SIZE + 2 + 2 |
| The size of the RpcHeader structure in bytes.
|
|
◆ Create() [1/2]
Creates a new RpcHeader with the provided staticRpcKey.
- Parameters
-
staticRpcKey | The staticRpcKey associated with the RPC message. |
- Returns
- Returns a new RpcHeader with the provided staticRpcKey.
◆ Create() [2/2]
Creates a new RpcHeader with the provided NetworkId, behaviour, and method.
- Parameters
-
id | The NetworkId of the object associated with the RPC message. |
behaviour | The behaviour associated with the RPC message. |
method | The 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
-
data | The byte pointer to read the RpcHeader from. |
size | The 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
-
data | The 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
-
header | The RpcHeader to write. |
data | The byte pointer to write the RpcHeader to. |
- Returns
- Returns the size of the RpcHeader structure in bytes.