|
@@ -17,6 +17,11 @@ class Host {
|
|
public var hostEntry(default, null) : IPHostEntry;
|
|
public var hostEntry(default, null) : IPHostEntry;
|
|
public var ipAddress(default, null) : IPAddress;
|
|
public var ipAddress(default, null) : IPAddress;
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ The provided host string.
|
|
|
|
+ **/
|
|
|
|
+ var host(default,null) : String;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
The actual IP corresponding to the host.
|
|
The actual IP corresponding to the host.
|
|
**/
|
|
**/
|
|
@@ -30,6 +35,7 @@ class Host {
|
|
the corresponding IP address is resolved using DNS. An exception occur if the host name could not be found.
|
|
the corresponding IP address is resolved using DNS. An exception occur if the host name could not be found.
|
|
**/
|
|
**/
|
|
public function new( name : String ) : Void {
|
|
public function new( name : String ) : Void {
|
|
|
|
+ host = name;
|
|
hostEntry = Dns.GetHostEntry(name);
|
|
hostEntry = Dns.GetHostEntry(name);
|
|
for (i in 0...hostEntry.AddressList.Length) {
|
|
for (i in 0...hostEntry.AddressList.Length) {
|
|
if (hostEntry.AddressList[i].AddressFamily == InterNetwork) {
|
|
if (hostEntry.AddressList[i].AddressFamily == InterNetwork) {
|