TransportIsLocalAddress Method

Determines if an IP address (or DNS name) is a local IP address. Method could fail if machine has DNS issues.

Definition

Namespace: Gemstone.Communication
Assembly: Gemstone.Communication (in Gemstone.Communication.dll) Version: 1.0.187 -- Release Build+c56c9af4c34d409d2da8c862e706d11e5800cd2b
public static bool IsLocalAddress(
	string hostNameOrAddress
)

Parameters

hostNameOrAddress  String
DNS name or IP address to test.

Return Value

Boolean
true if hostNameOrAddress is a local IP address; otherwise false.

Exceptions

SocketExceptionAn error is encountered when resolving hostNameOrAddress.
ArgumentExceptionhostNameOrAddress is an invalid IP address.
ArgumentOutOfRangeExceptionThe length of hostNameOrAddress is greater than 255 characters.
ArgumentNullExceptionhostNameOrAddress is null.

See Also