From 56554c5210ee43ce1e6b69acea261b1334321953 Mon Sep 17 00:00:00 2001 From: sta Date: Sun, 5 Oct 2014 13:32:58 +0900 Subject: [PATCH] Modified a few for Example --- Example/Program.cs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Example/Program.cs b/Example/Program.cs index 2ea914f6..cb1f3371 100644 --- a/Example/Program.cs +++ b/Example/Program.cs @@ -11,12 +11,12 @@ 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. The WebSocket connection has been 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 has been 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 - * the instance with the wss scheme WebSocket URL. + * If you would like to connect to the server with the secure connection, you should + * create the instance with the wss scheme WebSocket URL. */ using (var nf = new Notifier ()) using (var ws = new WebSocket ("ws://echo.websocket.org")) @@ -65,11 +65,12 @@ namespace Example // To negotiate the Per-message Compression extension. //ws.Compression = CompressionMethod.Deflate; - // To validate the server certificate. - //ws.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => { - // ws.Log.Debug (String.Format ("\n{0}\n{1}", certificate.Issuer, certificate.Subject)); - // return true; // If the server certificate is valid. - //}; + /* To validate the server certificate. + ws.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => { + ws.Log.Debug (String.Format ("\n{0}\n{1}", certificate.Issuer, certificate.Subject)); + return true; // If the server certificate is valid. + }; + */ // To set the credentials for the HTTP Authentication (Basic/Digest). //ws.SetCredentials ("nobita", "password", false);