From 6da68d455a1016724681da5966d645729bbec73a Mon Sep 17 00:00:00 2001 From: sta Date: Fri, 13 Nov 2015 14:52:35 +0900 Subject: [PATCH] [Modify] Add a property Add IsBinary property to determine that the message type is binary. --- websocket-sharp/MessageEventArgs.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/websocket-sharp/MessageEventArgs.cs b/websocket-sharp/MessageEventArgs.cs index 5715f148..09bf6149 100644 --- a/websocket-sharp/MessageEventArgs.cs +++ b/websocket-sharp/MessageEventArgs.cs @@ -97,6 +97,18 @@ namespace WebSocketSharp } } + /// + /// Gets a value indicating whether the message type is binary. + /// + /// + /// true if the message type is binary; otherwise, false. + /// + public bool IsBinary { + get { + return _opcode == Opcode.Binary; + } + } + /// /// Gets a value indicating whether the message type is text. ///