|
|
|
@ -964,6 +964,20 @@ namespace WebSocketSharp
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
internal static bool TryGetUTF8EncodedBytes (this string s, out byte[] bytes)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bytes = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
bytes = Encoding.UTF8.GetBytes (s);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
internal static bool TryOpenRead (
|
|
|
|
internal static bool TryOpenRead (
|
|
|
|
this FileInfo fileInfo, out FileStream fileStream
|
|
|
|
this FileInfo fileInfo, out FileStream fileStream
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|