Struct ReliableUtility
Utility methods and types for the reliable pipeline stage.
Inherited Members
Namespace: Unity.Networking.Transport.Utilities
Assembly: solution.dll
Syntax
public struct ReliableUtility
Remarks
Most methods are meant for internal use only. It is recommended not to rely on anything in in structure since it is very likely to change in a future major version of the package.
Fields
Name | Description |
---|---|
DefaultMinimumResendTime | The least amount of time we'll wait until a packet resend is performed. |
MaximumResendTime | The maximum amount of time we'll wait to resend a packet. |
NullEntry | Internal value. Do not use. |
Methods
Name | Description |
---|---|
CalculateProcessingTime(byte*, ushort, long) | |
GetLocalPacketTimer(byte*, ushort) | |
GetPacket(byte*, int) | |
GetPacketInformation(byte*, int) | |
GetRemotePacketTimer(byte*, ushort) | |
InitializeContext(byte*, int, byte*, int, byte*, int, Parameters) | |
InitializeProcessContext(byte*, int, Parameters) | |
ProcessCapacityNeeded(Parameters) | |
Read(NetworkPipelineContext, PacketHeader) | Read header data and update reliability tracking information in the shared context.
|
ReadAckPacket(NetworkPipelineContext, PacketHeader) | |
Release(byte*, int) | |
Release(byte*, int, int) | |
ReleaseOrResumePackets(NetworkPipelineContext) | Acknowledge the reception of packets which have been sent. The reliability shared context/state is updated when packets are received from the other end of the connection. The other side will update it's ackmask with which packets have been received (starting from last received sequence ID) each time it sends a packet back. This checks the resend timers on each non-acknowledged packet and notifies if it's time to resend yet. |
ResumeReceive(NetworkPipelineContext, int, ref bool) | Resume or play back a packet we had received earlier out of order. When an out of order packet is received it is stored since we need to first return the packet with the next sequence ID. When that packet finally arrives it is returned but a pipeline resume is requested since we already have the next packet stored and it can be processed immediately after. |
ResumeSend(NetworkPipelineContext, out PacketHeader, ref bool) | Resend a packet which we have not received an acknowledgement for in time. Pipeline resume will be enabled if there are more packets which we need to resend. The send reliability context will then also be updated to track the next packet we need to resume. |
SetHeaderAndPacket(byte*, int, PacketHeader, InboundSendBuffer, long) | Write packet, packet header and tracking information to the given buffer space. This buffer should contain the reliability Context at the front, that contains the capacity of the buffer and pointer offsets needed to find the slots we can copy the packet to. |
SetMinimumResendTime(int, NetworkDriver, NetworkPipeline, NetworkConnection) | |
SetPacket(byte*, int, void*, int) | |
SetPacket(byte*, int, InboundRecvBuffer) | |
SharedCapacityNeeded(Parameters) | |
ShouldSendAck(NetworkPipelineContext) | |
StoreReceiveTimestamp(byte*, ushort, long, ushort) | |
StoreRemoteReceiveTimestamp(byte*, ushort, long) | |
StoreTimestamp(byte*, ushort, long) | |
TryAquire(byte*, int) | |
Write(NetworkPipelineContext, InboundSendBuffer, ref PacketHeader) | Store the packet for possible later resends, and fill in the header we'll use to send it (populate with sequence ID, last acknowledged ID from remote with ackmask. |
WriteAckPacket(NetworkPipelineContext, ref PacketHeader) | Write an ack packet, only the packet header is used and this doesn't advance the sequence ID. The packet is not stored away for resend routine. |