Struct SimulatorUtility
Utility methods and types for the simulator pipeline stage.
Assembly: Unity.Networking.Transport.dll
Syntax
public struct SimulatorUtility
Constructors
SimulatorUtility(int, int, int, int)
Declaration
public SimulatorUtility(int packetCount, int maxPacketSize, int packetDelayMs, int packetJitterMs)
Parameters
Type |
Name |
Description |
int |
packetCount |
|
int |
maxPacketSize |
|
int |
packetDelayMs |
|
int |
packetJitterMs |
|
Methods
DelayPacket(ref NetworkPipelineContext, InboundSendBuffer, ref Requests, long)
Declaration
public bool DelayPacket(ref NetworkPipelineContext ctx, InboundSendBuffer inboundBuffer, ref NetworkPipelineStage.Requests requests, long timestamp)
Parameters
Returns
FuzzPacket(Context*, ref InboundSendBuffer)
Declaration
public void FuzzPacket(SimulatorUtility.Context* ctx, ref InboundSendBuffer inboundBuffer)
Parameters
GetDelayedPacket(ref NetworkPipelineContext, ref InboundSendBuffer, ref Requests, long)
Declaration
public bool GetDelayedPacket(ref NetworkPipelineContext ctx, ref InboundSendBuffer delayedPacket, ref NetworkPipelineStage.Requests requests, long currentTimestamp)
Parameters
Returns
GetEmptyDataSlot(byte*, ref int, ref int)
Declaration
public bool GetEmptyDataSlot(byte* processBufferPtr, ref int packetPayloadOffset, ref int packetDataOffset)
Parameters
Type |
Name |
Description |
byte* |
processBufferPtr |
|
int |
packetPayloadOffset |
|
int |
packetDataOffset |
|
Returns
InitializeContext(Parameters, byte*)
Declaration
public static void InitializeContext(SimulatorUtility.Parameters param, byte* sharedProcessBuffer)
Parameters
ShouldDropPacket(Context*, Parameters, long)
Declaration
public bool ShouldDropPacket(SimulatorUtility.Context* ctx, SimulatorUtility.Parameters param, long timestamp)
Parameters
Returns