Nebula
Transport

TransportEvent

Stores the values used by transport event.

generated from the sources
public readonly struct TransportEvent

Stores the values used by transport event.

Constructors

TransportEvent

public TransportEvent(Kind type, int peerId, ArraySegment<byte> data);
public TransportEvent(Kind type, int peerId, ArraySegment<byte> data, bool sequenced);
public TransportEvent(Kind type, int peerId, ArraySegment<byte> data, TransportDisconnectReason reason, bool sequenced = false);

A Kind.Data event that says whether the packet came in on the sequenced channel (sequenced).

Fields

Type

public readonly Kind Type;

PeerId

public readonly int PeerId;

Data

public readonly ArraySegment<byte> Data;

Reason

public readonly TransportDisconnectReason Reason;

Why the link closed, for a Kind.Disconnected event; TransportDisconnectReason.Unknown otherwise.

Sequenced

public readonly bool Sequenced;

For a Kind.Data event: whether the packet arrived on the Delivery.Sequenced channel, where a late packet may be lost, instead of the reliable one. False when the transport does not say.

Methods

Disconnected

public static TransportEvent Disconnected(int peerId, TransportDisconnectReason reason);

A Kind.Disconnected event for peerId that says why the link closed.

Nested types

Kind

public enum Kind : byte

Lists the supported kind values.

Members

NameValueDescription
Connected
Disconnected
Data

On this page