From fa936b17430548d21c52eeadc26d397a5313a4aa Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 21 Jan 2015 16:45:54 +0900 Subject: [PATCH] Added the IsSendable (ushort) method --- websocket-sharp/Ext.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index b22335a9..48da15ca 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -610,6 +610,11 @@ namespace WebSocketSharp code == CloseStatusCode.TlsHandshakeFailure; } + internal static bool IsSendable (this ushort code) + { + return !code.IsReserved () || code.IsNoStatusCode (); + } + internal static bool IsText (this string value) { var len = value.Length;