NetUtilsResolveAddress(String) Method |
Namespace: LiteNetLibAssembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntaxpublic static IPAddress ResolveAddress(
string hostStr
)
Parameters
- hostStr String
- The host name or IP address string (e.g., "127.0.0.1", "localhost", or "google.com").
Return Value
IPAddressThe resolved
IPAddress.
Exceptions| Exception | Condition |
|---|
| ArgumentException | Thrown when the address cannot be resolved or is invalid. |
Remarks
This method handles "localhost" specifically, attempts to parse the string as a direct IP,
and falls back to DNS resolution. It prioritizes IPv6 if
IPv6Support is enabled.
See Also