Replaced the ToExtensionString method with ToExtensionString (this CompressionMethod, params string[]) method
This commit is contained in:
parent
39636b4b30
commit
ec45f6a7b6
@ -819,11 +819,17 @@ namespace WebSocketSharp
|
|||||||
return CompressionMethod.None;
|
return CompressionMethod.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string ToExtensionString (this CompressionMethod method)
|
internal static string ToExtensionString (
|
||||||
|
this CompressionMethod method, params string[] parameters)
|
||||||
{
|
{
|
||||||
return method != CompressionMethod.None
|
if (method == CompressionMethod.None)
|
||||||
? String.Format ("permessage-{0}", method.ToString ().ToLower ())
|
return String.Empty;
|
||||||
: String.Empty;
|
|
||||||
|
var m = String.Format ("permessage-{0}", method.ToString ().ToLower ());
|
||||||
|
if (parameters == null || parameters.Length == 0)
|
||||||
|
return m;
|
||||||
|
|
||||||
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user