From 1b5d84456cd11c92a580304fa2cf979a4985617e Mon Sep 17 00:00:00 2001 From: sta Date: Sat, 22 Oct 2016 17:26:11 +0900 Subject: [PATCH] [Modify] Edit it --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ce82ed05..d0a0dad0 100644 --- a/README.md +++ b/README.md @@ -540,13 +540,13 @@ As a WebSocket client, if you would like to send the query string in the handsha var ws = new WebSocket ("ws://example.com/?name=nobita"); ``` -And if you would like to send the Origin header in the handshake request, you should set the `WebSocket.Origin` property to an allowable value as the [Origin] header before calling the connect method. +If you would like to send the Origin header in the handshake request, you should set the `WebSocket.Origin` property to an allowable value as the [Origin] header before calling the connect method. ```csharp ws.Origin = "http://example.com"; ``` -And also if you would like to send the cookies in the handshake request, you should set any cookie by using the `WebSocket.SetCookie (WebSocketSharp.Net.Cookie)` method before calling the connect method. +And if you would like to send the cookies in the handshake request, you should set any cookie by using the `WebSocket.SetCookie (WebSocketSharp.Net.Cookie)` method before calling the connect method. ```csharp ws.SetCookie (new Cookie ("name", "nobita")); @@ -569,9 +569,11 @@ public class Chat : WebSocketBehavior } ``` -And if you would like to get each value of the Origin header and cookies, you should access each of the `WebSocketBehavior.Context.Origin` and `WebSocketBehavior.Context.CookieCollection` properties. +If you would like to get the value of the Origin header included in a handshake request, you should access the `WebSocketBehavior.Context.Origin` property. -And also if you would like to validate the Origin header, cookies, or both included in a handshake request, you should set each validation with your `WebSocketBehavior`, for example, by using the `WebSocketServer.AddWebSocketService (string, Func)` method with initializing, such as the following. +If you would like to get the cookies included in a handshake request, you should access the `WebSocketBehavior.Context.CookieCollection` property. + +And if you would like to validate the Origin header, cookies, or both, you should set each validation for it with your `WebSocketBehavior`, for example, by using the `WebSocketServer.AddWebSocketService (string, Func)` method with initializing, such as the following. ```csharp wssv.AddWebSocketService (