Faultline API Reference

All Types / Faultline.Network

class SimUdpSocket

public sealed class SimUdpSocket : IDisposable

Virtual UDP datagram socket bound to a (SimHost, port) endpoint on SimNetwork. Supports independent per-datagram latency (allowing out-of-order delivery), drops, duplication, and bandwidth limits.

Properties

public string HostName
public int Port
public bool IsOpen

Methods

public ValueTask SendToAsync(
        string targetHostName,
        int targetPort,
        ReadOnlyMemory<byte> payload,
        CancellationToken cancellationToken = default)
public Task<SimDatagram> ReceiveFromAsync(CancellationToken cancellationToken = default)
public void Dispose()