DiscoveryFindServerAddress(Boolean) Method

Finds IP address belonging to a LAN on which to run a TCP server.

Definition

Namespace: KLib.Net
Assembly: KLib.Net (in KLib.Net.dll) Version: 1.0.0.0 (1.0.0.0)
C#
public static string FindServerAddress(
	bool canUseLocalhost
)

Parameters

canUseLocalhost  Boolean
specifies whether a localhost connection is allowed. Defaults to true.

Return Value

String
IP address of NIC attached to LAN

Remarks

Parses ARP table to find a valid LAN address (starting with 169.254 or 11.12.13). Optionally defaults to localhost if no NIC found.

See Also