[Modify] Add it

This commit is contained in:
sta 2017-07-07 15:09:19 +09:00
parent ecd9e682e6
commit 1b609838f4

View File

@ -405,6 +405,13 @@ namespace WebSocketSharp
return idx > 0 ? original.Substring (0, idx) : original; return idx > 0 ? original.Substring (0, idx) : original;
} }
internal static string GetDnsSafeHost (this Uri uri, bool bracketIPv6)
{
return bracketIPv6 && uri.HostNameType == UriHostNameType.IPv6
? uri.Host
: uri.DnsSafeHost;
}
internal static string GetMessage (this CloseStatusCode code) internal static string GetMessage (this CloseStatusCode code)
{ {
return code == CloseStatusCode.ProtocolError return code == CloseStatusCode.ProtocolError