Repository navigation
Home | API by Category | Complete API Index | API Status
| Field | Value |
|---|---|
| Full name | Electron2D.IP |
| Namespace | Electron2D |
| Kind | class |
| Category | API Networking |
Provides process-wide hostname resolution, bounded queued lookups and network-interface snapshots.
public sealed class Electron2D.IPStatic operations address one retained object registered with Engine. Calls are thread safe; native DNS and interface enumeration are cold host work. Queue IDs remain occupied after completion until explicitly erased. Address snapshots belong to the caller. The process-wide object cannot be disposed.
Inherits: ElectronObject
Kind: constant
public const System.Int32 ResolverInvalidID = -1Identifies failure to reserve a resolver queue slot.
Kind: constant
public const System.Int32 ResolverMaxQueries = 256Maximum simultaneous retained queue items, including completed items.
Kind: method
public static System.Void ClearCache(System.String host = "")Removes cached host results without erasing queue items.
Older in-flight lookups cannot repopulate cleared cache entries; their queue results still complete normally.
-
host: Empty clears all; otherwise all family entries for this exact spelling are removed.
Kind: method
protected override System.Void Dispose(System.Boolean disposing)Kind: method
public static System.Void EraseResolveItem(System.Int32 id)Erases a slot and cancels its pending lookup.
Late completion cannot publish into a reused slot or its cache entry. Existing caller snapshots stay valid.
-
id: An in-range slot ID; an already erased slot is a no-op.
Kind: method
public static System.String[] GetLocalAddresses()Snapshots all current local IPv4/IPv6 unicast addresses.
A caller-owned array; interface ordering is not a routing preference.
Kind: method
public static Electron2D.IPInterfaceInfo[] GetLocalInterfaces()Snapshots the host's network adapters and current unicast addresses.
A caller-owned typed array with adapter identifiers, names, string indexes and address arrays.
-
T:System.PlatformNotSupportedException: Native interfaces are unavailable on this target.
Kind: method
public static System.String GetResolveItemAddress(System.Int32 id)Reads the first completed queue address without waiting.
A cached string, or empty unless Done.
-
id: An in-range slot ID.
Kind: method
public static System.String[] GetResolveItemAddresses(System.Int32 id)Copies all completed queue addresses.
A caller-owned array, or empty unless Done.
-
id: An in-range slot ID.
Kind: method
public static Electron2D.ResolverStatus GetResolveItemStatus(System.Int32 id)Reads a queued lookup's phase without waiting.
None for an unused/erased slot.
-
id: An in-range resolver slot ID.
Kind: method
public static System.String ResolveHostname(System.String host, Electron2D.IPType type = Any)Resolves the first host address synchronously.
A normalized address string, or empty when DNS fails or no matching address exists.
-
host: A hostname or address literal; ordinal cache keys preserve the supplied spelling. -
type: Any by default; None also selects the platform unspecified-family policy.
-
T:System.ArgumentException: The host is null or empty. -
T:System.ArgumentOutOfRangeException: The family is undefined. -
T:System.PlatformNotSupportedException: Native DNS is unavailable on this target.
Kind: method
public static System.String[] ResolveHostnameAddresses(System.String host, Electron2D.IPType type = Any)Resolves all distinct matching addresses synchronously.
A caller-owned array; empty on DNS failure or no matching addresses. Host ordering is retained.
-
host: A hostname or literal. -
type: The requested family, Any initially.
Kind: method
public static System.Int32 ResolveHostnameQueueItem(System.String host, Electron2D.IPType type = Any)Reserves a queue item and starts or reuses a lookup.
Completion can occur before return. Call EraseResolveItem after use; completion alone does not free a slot.
A slot in [0,255], or ResolverInvalidID when all slots remain occupied.
-
host: A hostname or literal. -
type: The requested family, Any initially.
Kind: method
protected override System.Void ValidateDisposal()The retained process-wide service has process lifetime.