Table of Contents

Class UdpTransport

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

Constructors

UdpTransport(IStats, Logger, IDateTimeProvider)

public UdpTransport(IStats stats, Logger logger, IDateTimeProvider dateTimeProvider = null)

Parameters

stats IStats
logger Logger
dateTimeProvider IDateTimeProvider

Fields

dateTimeProvider

protected readonly IDateTimeProvider dateTimeProvider

Field Value

IDateTimeProvider

dev_blockTraffic

protected bool dev_blockTraffic

Field Value

bool

flux

protected readonly Flux flux

Field Value

Flux

lastValidPacketTime

protected DateTime lastValidPacketTime

Field Value

DateTime

logger

protected readonly Logger logger

Field Value

Logger

settings

protected ConnectionSettings settings

Field Value

ConnectionSettings

Properties

CanSend

public bool CanSend { get; }

Property Value

bool

HeaderSize

public int HeaderSize { get; }

Property Value

int

IsReliable

public bool IsReliable { get; }

Property Value

bool

State

public TransportState State { get; protected set; }

Property Value

TransportState

Methods

CheckForTimeout(bool)

protected virtual void CheckForTimeout(bool anyValidPacketReceived)

Parameters

anyValidPacketReceived bool

Close()

public void Close()

HandleSessionID(IInOctetStream)

protected virtual bool HandleSessionID(IInOctetStream stream)

Parameters

stream IInOctetStream

Returns

bool

Open(EndpointData, ConnectionSettings)

public void Open(EndpointData endpoint, ConnectionSettings settings)

Parameters

endpoint EndpointData
settings ConnectionSettings

PrepareDisconnect()

public void PrepareDisconnect()

RaiseOnError(ConnectionException)

protected void RaiseOnError(ConnectionException exception)

Parameters

exception ConnectionException

RaiseOnOpen()

protected void RaiseOnOpen()

Receive(List<(IInOctetStream, IPEndPoint)>)

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

Parameters

buffer List<(IInOctetStream, IPEndPoint)>

Send(IOutOctetStream)

public void Send(IOutOctetStream stream)

Parameters

stream IOutOctetStream

Events

OnError

public event Action<ConnectionException> OnError

Event Type

Action<ConnectionException>

OnOpen

public event Action OnOpen

Event Type

Action