Skip to main content

Unity.Networking.Transport.Utilities.SimulatorUtility

Inheritance#

System.Dynamic.ExpandoObject

System.Dynamic.ExpandoObject

Inherited Members#

Object.Equals(Object)

Object.Equals(Object, Object)

Object.GetHashCode()

Object.GetType()

Object.MemberwiseClone()

Object.ReferenceEquals(Object, Object)

Object.ToString()

Namespace: System.Dynamic.ExpandoObject#
Assembly: transport.dll#
Syntax#
public static class SimulatorUtility

FuzzPacket(SimulatorUtility.Context*, ref SimulatorUtility.Parameters, ref InboundSendBuffer)#

Declaration#

public static void FuzzPacket(SimulatorUtility.Context*ctx, ref SimulatorUtility.Parameters param, ref InboundSendBuffer inboundBuffer)

Parameters#

TypeNameDescription
SimulatorUtility.Context*ctx
SimulatorUtility.Parametersparam
InboundSendBufferinboundBuffer

GetDelayedPacket(ref NetworkPipelineContext, ref InboundSendBuffer, ref NetworkPipelineStage.Requests, Int64)#

Declaration#

public static bool GetDelayedPacket(ref NetworkPipelineContext ctx, ref InboundSendBuffer delayedPacket, ref NetworkPipelineStage.Requests requests, long currentTimestamp)

Parameters#

TypeNameDescription
NetworkPipelineContextctx
InboundSendBufferdelayedPacket
NetworkPipelineStage.Requestsrequests
System.Int64currentTimestamp

Returns#

TypeDescription
System.Boolean

GetEmptyDataSlot(NetworkPipelineContext, Byte*, ref Int32, ref Int32)#

Declaration#

public static bool GetEmptyDataSlot(NetworkPipelineContext ctx, byte *processBufferPtr, ref int packetPayloadOffset, ref int packetDataOffset)

Parameters#

TypeNameDescription
NetworkPipelineContextctx
System.Byte*processBufferPtr
System.Int32packetPayloadOffset
System.Int32packetDataOffset

Returns#

TypeDescription
System.Boolean

InitializeContext(SimulatorUtility.Parameters, Byte*)#

Declaration#

public static void InitializeContext(SimulatorUtility.Parameters param, byte *sharedProcessBuffer)

Parameters#

TypeNameDescription
SimulatorUtility.Parametersparam
System.Byte*sharedProcessBuffer

ShouldDropPacket(SimulatorUtility.Context*, SimulatorUtility.Parameters, Int64)#

Declaration#

public static bool ShouldDropPacket(SimulatorUtility.Context*ctx, SimulatorUtility.Parameters param, long timestamp)

Parameters#

TypeNameDescription
SimulatorUtility.Context*ctx
SimulatorUtility.Parametersparam
System.Int64timestamp

Returns#

TypeDescription
System.Boolean

ShouldDuplicatePacket(SimulatorUtility.Context*, ref SimulatorUtility.Parameters)#

Declaration#

public static bool ShouldDuplicatePacket(SimulatorUtility.Context*ctx, ref SimulatorUtility.Parameters param)

Parameters#

TypeNameDescription
SimulatorUtility.Context*ctx
SimulatorUtility.Parametersparam

Returns#

TypeDescription
System.Boolean

TryDelayPacket(ref NetworkPipelineContext, ref SimulatorUtility.Parameters, ref InboundSendBuffer, ref NetworkPipelineStage.Requests, Int64)#

Storing it twice will trigger a resend.

Declaration#

public static bool TryDelayPacket(ref NetworkPipelineContext ctx, ref SimulatorUtility.Parameters param, ref InboundSendBuffer inboundBuffer, ref NetworkPipelineStage.Requests requests, long timestamp)

Parameters#

TypeNameDescription
NetworkPipelineContextctx
SimulatorUtility.Parametersparam
InboundSendBufferinboundBuffer
NetworkPipelineStage.Requestsrequests
System.Int64timestamp

Returns#

TypeDescription
System.Boolean

TrySkipDelayingPacket(ref SimulatorUtility.Parameters, ref NetworkPipelineStage.Requests, SimulatorUtility.Context*)#

Optimization. We want to skip TryDelayPacket(ref NetworkPipelineContext, ref SimulatorUtility.Parameters, ref InboundSendBuffer, ref NetworkPipelineStage.Requests, Int64) in the case where we have no delay to avoid mem-copies. Also ensures requests are updated if there are other packets in the store.

Declaration#

public static bool TrySkipDelayingPacket(ref SimulatorUtility.Parameters param, ref NetworkPipelineStage.Requests requests, SimulatorUtility.Context*simCtx)

Parameters#

TypeNameDescription
SimulatorUtility.Parametersparam
NetworkPipelineStage.Requestsrequests
SimulatorUtility.Context*simCtx

Returns#

TypeDescription
System.BooleanTrue if we can skip delaying this packet.