From 43ac429328227f4332e71dbf0e08389f6bf4dbaa Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 21 Jan 2014 15:01:50 +0900 Subject: [PATCH] Modified Step 6 of 'WebSocket Client' --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ba2adf20..86b1e4d5 100644 --- a/README.md +++ b/README.md @@ -204,16 +204,14 @@ And if you want to do something when the send is complete, you should set any ac Closing the WebSocket connection. ```cs -ws.Close (); +ws.Close (code, reason); ``` If you want to close the connection explicitly, you should use the `WebSocket.Close` method. The `WebSocket.Close` method is overloaded. -The `WebSocket.Close ()`, `WebSocket.Close (code)` and `WebSocket.Close (code, reason)` methods exist. - -The type of `code` is `WebSocketSharp.CloseStatusCode` or `ushort`, and the type of `reason` is `string`. +You can use the `WebSocket.Close ()`, `WebSocket.Close (ushort)`, `WebSocket.Close (WebSocketSharp.CloseStatusCode)`, `WebSocket.Close (ushort, string)`, or `WebSocket.Close (WebSocketSharp.CloseStatusCode, string)` to close the connection. If you want to close the connection asynchronously, you should use the `WebSocket.CloseAsync` method.