From 09ab8f01d2667034123bcc13426ade5c00356e06 Mon Sep 17 00:00:00 2001 From: sta Date: Mon, 5 Aug 2019 21:46:39 +0900 Subject: [PATCH] [Modify] Add it --- websocket-sharp/WebSocketFrame.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/websocket-sharp/WebSocketFrame.cs b/websocket-sharp/WebSocketFrame.cs index 84159b6a..345f10cf 100644 --- a/websocket-sharp/WebSocketFrame.cs +++ b/websocket-sharp/WebSocketFrame.cs @@ -637,6 +637,16 @@ Extended Payload Length: {7} stream.ReadBytesAsync (llen, 1024, compl, error); } + private static string utf8Decode (byte[] bytes) + { + try { + return Encoding.UTF8.GetString (bytes); + } + catch { + return null; + } + } + #endregion #region Internal Methods