Method RetrievePayloadBuffer
RetrievePayloadBuffer(PayloadHandle, out NativeArray<byte>)
Retrieves a NativeArray to safely access Payload memory.
Declaration
public bool RetrievePayloadBuffer(PayloadHandle handle, out NativeArray<byte> payloadBuffer)
Parameters
Type | Name | Description |
---|---|---|
Payload |
handle | A valid Payload |
Native |
payloadBuffer | NativeArray that allows safe access to the allocated Payload buffer. |
Returns
Type | Description |
---|---|
bool | True if successfully accessed Payload buffer. |
Remarks
RetrievePayloadBuffer(PayloadHandle, bool, out NativeArray<byte>)
Retrieves a NativeArray to safely access Payload memory.
Declaration
public bool RetrievePayloadBuffer(PayloadHandle handle, bool readWriteAccess, out NativeArray<byte> payloadBuffer)
Parameters
Type | Name | Description |
---|---|---|
Payload |
handle | A valid Payload |
bool | readWriteAccess | True to allow write-access to the returned NativeArray, otherwise it's read-only |
Native |
payloadBuffer | NativeArray that allows safe access to the allocated Payload buffer. |
Returns
Type | Description |
---|---|
bool | True if successfully accessed Payload buffer. |
Remarks
Listeners must call this to read the log message data when processing a Log
By default the return NativeArray is read-only, since typically Listeners only need to de-serialize the buffer contents and don't need to write into the buffer.