Navigation
API > API/Runtime > API/Runtime/IrisCore > API/Runtime/IrisCore/UChunkedDataStream
Description
Serialize data to a bitstream and optionally store record of what was serialized to a custom FDataStreamRecord. The FDataStreamRecord allow streams to implement custom delivery guarantees as they see fit by using the stored information when ProcessPacketDeliveryStatus is called. For each WriteData call returning something other than NoData a corresponding call to ProcessPacketDeliveryStatus will be made. The UDataStream owns the FDataStreamRecord, but there will always be a call to ProcessPacketDeliveryStatus passing the original OutRecord so that it can be deleted when all packets have been ACKed/NAKed or when the owning connection is closed.
Virtual Inheritance
- UDataStream::WriteData → UChunkedDataStream::WriteData
| Name | WriteData |
| Type | function |
| Header File | /Engine/Source/Runtime/Net/Iris/Public/Iris/ReplicationSystem/ChunkedDataStream/ChunkedDataStream.h |
| Include Path | #include "Iris/ReplicationSystem/ChunkedDataStream/ChunkedDataStream.h" |
| Source | /Engine/Source/Runtime/Net/Iris/Private/Iris/ReplicationSystem/ChunkedDataStream/ChunkedDataStream.cpp |
virtual EWriteResult WriteData
(
UE::Net::FNetSerializationContext & Context,
FDataStreamRecord const *& OutRecord
)
Whether there was data written or not and if the stream has more data to write if bandwidth settings allow it.
Parameters
| Name | Remarks |
|---|---|
| Context | The FNetSerializationContext which has accesssors for the bitstream to write to among other things. |
| OutRecord | Set the data stream specific record to OutRecord so that it can be passed in a future ProcessPacketDeliveryStatus call. ProcessPacketDeliveryStatus will be called with the record in the same order as WriteData was called. |