public int HostIdAll Types / Faultline
class SimHost
public sealed class SimHost : IDisposable
Represents a virtual node/host executing inside a SimWorld, with its own virtual clock, deterministic PRNG, virtual network endpoints, and crash/restart lifecycle.
Properties
public string Namepublic IPAddress AddressDeterministic virtual IPv4 address assigned to this host (e.g., 10.0.0.1).
public SimClock Clockpublic SimRandom Randompublic SimFileSystem FileSystempublic bool IsRunningpublic CancellationToken ShutdownTokenMethods
public SimListener Listen(int port)public SimUdpSocket BindUdp(int port)public Task<SimStream> ConnectAsync(string targetHostName, int port, CancellationToken cancellationToken = default)public Task DelayAsync(TimeSpan delay, CancellationToken cancellationToken = default)public Task YieldAsync()public Task RunTaskAsync(Func<Task> action)public Task<T> RunTaskAsync<T>(Func<Task<T>> action)public void Crash()Simulates an abrupt host crash by cancelling its shutdown token, unbinding all listeners, and sending TCP RST to all active connections.
public void Restart()Restarts a crashed host with a fresh shutdown token and re-invokes its registered entrypoint.
public void Dispose()