TransportEvent
Stores the values used by transport event.
Nebula · Packages/com.1by3.nebula/Runtime/Transport/ITransport.cspublic readonly struct TransportEventStores 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 : byteLists the supported kind values.
Members
| Name | Value | Description |
|---|---|---|
Connected | ||
Disconnected | ||
Data |
TransportDisconnectReason
Why a transport link closed, in terms that do not depend on the transport: carried by a TransportEvent.Kind.Disconnected event in TransportEvent.Reason.
TransportIdentity
Holds the gateway's X.509 certificate, RSA private signing key, and public-key fingerprint for client pinning.