Refactored a few for Ext.cs
This commit is contained in:
parent
96b684036f
commit
3c0fa929a1
@ -776,11 +776,10 @@ namespace WebSocketSharp
|
|||||||
return String.Format ("{0}; {1}", m, parameters.ToString ("; "));
|
return String.Format ("{0}; {1}", m, parameters.ToString ("; "));
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static System.Net.IPAddress ToIPAddress (this string hostNameOrAddress)
|
internal static System.Net.IPAddress ToIPAddress (this string hostnameOrAddress)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
var addrs = System.Net.Dns.GetHostAddresses (hostNameOrAddress);
|
return System.Net.Dns.GetHostAddresses (hostnameOrAddress)[0];
|
||||||
return addrs[0];
|
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user