parent
508a2b3bb1
commit
aff6bc4128
@ -841,6 +841,10 @@ namespace WebSocketSharp
|
||||
|
||||
internal static System.Net.IPAddress ToIPAddress (this string hostnameOrAddress)
|
||||
{
|
||||
System.Net.IPAddress addr;
|
||||
if (System.Net.IPAddress.TryParse (hostnameOrAddress, out addr))
|
||||
return addr;
|
||||
|
||||
try {
|
||||
return System.Net.Dns.GetHostAddresses (hostnameOrAddress)[0];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user