Class TransportConditioner
public class TransportConditioner : ITransport
- Inheritance
-
TransportConditioner
- Implements
- Derived
Constructors
TransportConditioner(ITransport, IDateTimeProvider, Logger)
public TransportConditioner(ITransport transport, IDateTimeProvider dateTimeProvider, Logger logger)
Parameters
transport
ITransportdateTimeProvider
IDateTimeProviderlogger
Logger
Fields
dateTimeProvider
protected readonly IDateTimeProvider dateTimeProvider
Field Value
logger
protected readonly Logger logger
Field Value
Properties
CanSend
public bool CanSend { get; }
Property Value
Conditions
protected Condition Conditions { get; }
Property Value
Config
public TransportConditioner.Configuration Config { get; protected set; }
Property Value
HeaderSize
public int HeaderSize { get; }
Property Value
IsReliable
public bool IsReliable { get; }
Property Value
Random
protected IRandom Random { get; }
Property Value
State
public TransportState State { get; }
Property Value
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
EndpointDatasettings
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
ShouldDropOutgoingPacket()
protected bool ShouldDropOutgoingPacket()
Returns
Events
OnError
public event Action<ConnectionException> OnError
Event Type
OnOpen
public event Action OnOpen