From 88747db6fa87362f4bcd5077f2483cf039443a36 Mon Sep 17 00:00:00 2001 From: sta Date: Mon, 25 Aug 2014 14:03:12 +0900 Subject: [PATCH] Modified 'WebSocket.OnMessage Event' --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7a5da376..26874f3c 100644 --- a/README.md +++ b/README.md @@ -136,11 +136,11 @@ ws.OnMessage += (sender, e) => { `e` has passed as a `WebSocketSharp.MessageEventArgs`. -`e.Type` property returns either `WebSocketSharp.Opcode.Text` or `WebSocketSharp.Opcode.Binary` that represents the type of the received message. So by checking it, you determine which item you should use. +`e.Type` property returns either `WebSocketSharp.Opcode.Text` or `WebSocketSharp.Opcode.Binary` that represents the type of the message. So by checking it, you can determine which item you should use. -If `e.Type` is `Opcode.Text`, you should use `e.Data` property (returns a `string`) that represents the received **Text** message. +If it returns `Opcode.Text`, you should use `e.Data` property that returns a `string` (represents the **Text** message). -Or if `e.Type` is `Opcode.Binary`, you should use `e.RawData` property (returns a `byte[]`) that represents the received **Binary** message. +Or if it returns `Opcode.Binary`, you should use `e.RawData` property that returns a `byte[]` (represents the **Binary** message). ```cs if (e.Type == Opcode.Text) {