From f6e721aca2d45c862a04bd983d52d147a3cc7282 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 11 Nov 2014 10:44:37 +0900 Subject: [PATCH] Modified a few for Example --- Example/Program.cs | 4 ++-- README.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Example/Program.cs b/Example/Program.cs index 3282957c..7d473b5e 100644 --- a/Example/Program.cs +++ b/Example/Program.cs @@ -12,7 +12,7 @@ namespace Example /* Create a new instance of the WebSocket class. * * The WebSocket class inherits the System.IDisposable interface, so you can use the using - * statement. And the WebSocket connection is closed with close status 1001 (going away) + * statement. And the WebSocket connection will be closed with close status 1001 (going away) * when the control leaves the using block. * * If you would like to connect to the server with the secure connection, you should create @@ -62,7 +62,7 @@ namespace Example // To change the wait time for the response to the Ping or Close. ws.WaitTime = TimeSpan.FromSeconds (10); #endif - // To negotiate the Per-message Compression extension. + // To enable the Per-message Compression extension. //ws.Compression = CompressionMethod.Deflate; /* To validate the server certificate. diff --git a/README.md b/README.md index b6359a94..d4e4be52 100644 --- a/README.md +++ b/README.md @@ -98,15 +98,15 @@ The `WebSocket` class exists in the `WebSocketSharp` namespace. #### Step 2 #### -Creating an instance of the `WebSocket` class with the WebSocket URL to connect. +Creating a new instance of the `WebSocket` class with the WebSocket URL to connect. -```cs +```csharp using (var ws = new WebSocket ("ws://example.com")) { ... } ``` -The `WebSocket` class inherits the `System.IDisposable` interface, so you can use the `using` statement. And the WebSocket connection is closed with close status `1001` (going away) when the control leaves the `using` block. +The `WebSocket` class inherits the `System.IDisposable` interface, so you can use the `using` statement. And the WebSocket connection will be closed with close status `1001` (going away) when the control leaves the `using` block. #### Step 3 ####