Table of Contents

Class TransportConditioner

Namespace
Coherence.Transport
Assembly
Coherence.Transport.dll
public class TransportConditioner : ITransport
Inheritance
TransportConditioner
Implements
Derived

Constructors

TransportConditioner(ITransport, IDateTimeProvider, Logger)

public TransportConditioner(ITransport transport, IDateTimeProvider dateTimeProvider, Logger logger)

Parameters

transport ITransport
dateTimeProvider IDateTimeProvider
logger Logger

Fields

dateTimeProvider

protected readonly IDateTimeProvider dateTimeProvider

Field Value

IDateTimeProvider

logger

protected readonly Logger logger

Field Value

Logger

Properties

CanSend

public bool CanSend { get; }

Property Value

bool

Conditions

protected Condition Conditions { get; }

Property Value

Condition

Config

public TransportConditioner.Configuration Config { get; protected set; }

Property Value

TransportConditioner.Configuration

HeaderSize

public int HeaderSize { get; }

Property Value

int

IsReliable

public bool IsReliable { get; }

Property Value

bool

Random

protected IRandom Random { get; }

Property Value

IRandom

State

public TransportState State { get; }

Property Value

TransportState

Methods

Close()

public void Close()

FlushDelayedOutgoingPackets()

protected virtual void FlushDelayedOutgoingPackets()

NotifyOnNextPacketSent()

protected void NotifyOnNextPacketSent()

Open(EndpointData, ConnectionSettings)

public void Open(EndpointData endpoint, ConnectionSettings settings)

Parameters

endpoint EndpointData
settings ConnectionSettings

PrepareDisconnect()

public void PrepareDisconnect()

ProcessDelayedOutgoingPackets(DateTime)

protected virtual void ProcessDelayedOutgoingPackets(DateTime now)

Parameters

now DateTime

Receive(List<(IInOctetStream, IPEndPoint)>)

public void Receive(List<(IInOctetStream, IPEndPoint)> buffer)

Parameters

buffer List<(IInOctetStream, IPEndPoint)>

ReleaseAllHeldOutgoingPackets()

Releases all packets held due to the HoldOutgoingPackets flag. Released packets are not subject to a drop or delay conditions.

public void ReleaseAllHeldOutgoingPackets()

Send(IOutOctetStream)

public void Send(IOutOctetStream data)

Parameters

data IOutOctetStream

SetConfiguration(Configuration)

public void SetConfiguration(TransportConditioner.Configuration configuration)

Parameters

configuration TransportConditioner.Configuration

ShouldDelayOutgoingPacket()

protected bool ShouldDelayOutgoingPacket()

Returns

bool

ShouldDropOutgoingPacket()

protected bool ShouldDropOutgoingPacket()

Returns

bool

Events

OnError

public event Action<ConnectionException> OnError

Event Type

Action<ConnectionException>

OnOpen

public event Action OnOpen

Event Type

Action