Nebula
Transport

LiteNetTransport

ITransport over LiteNetLib.

generated from the sources
public sealed class LiteNetTransport : ITransport, INetEventListener

ITransport over LiteNetLib. Sequenced maps to DeliveryMethod.Sequenced, everything else to DeliveryMethod.ReliableOrdered. Two LiteNetLib channels are used so a large reliable message cannot head-of-line block the transform stream. Events are queued by LiteNetLib and drained on the caller's thread inside Poll.

Constructors

LiteNetTransport

public LiteNetTransport(string name);

Fields

ConnectionKey

public const string ConnectionKey = "nebula-v1";

Properties

Name

public string Name { get; }

IsRunning

public bool IsRunning { get; }

LocalPort

public int LocalPort { get; }

Methods

Listen

public void Listen(int port);

StartClient

public void StartClient();

Connect

public int Connect(string host, int port);

Disconnect

public void Disconnect(int peerId);

IsConnected

public bool IsConnected(int peerId);

RoundTripMs

public int RoundTripMs(int peerId);

Send

public void Send(int peerId, Delivery delivery, ArraySegment<byte> payload);

Poll

public void Poll(Action<TransportEvent> handler);

Stop

public void Stop();

Dispose

public void Dispose();

On this page