From 7d06c0e92af152e2fcb5892e161e94f7bcca5c68 Mon Sep 17 00:00:00 2001 From: eynzhang Date: Tue, 10 Dec 2019 08:53:54 +0800 Subject: [PATCH 1/5] Update README.md Add guidline how to change SSL Protocol --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index e7049b224..4edcc63e5 100644 --- a/README.md +++ b/README.md @@ -491,6 +491,12 @@ ws.SslConfiguration.ServerCertificateValidationCallback = The default callback always returns `true`. +If you need to specify SSL protocol, you could change the enum, for example: + +```csharp +ws.SslConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.None +``` + As a WebSocket server, you should create a new instance of the `WebSocketServer` or `HttpServer` class with some settings for the secure connection, such as the following. ```csharp From 3cd347f3b40751a4e2c21b7c9b8d3ad53cfa2d0a Mon Sep 17 00:00:00 2001 From: eynzhang Date: Thu, 19 Dec 2019 17:00:24 +0800 Subject: [PATCH 2/5] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 376bdfd86..60463b66e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ Backup* _UpgradeReport_Files bin obj +.vs *.mdb *.pdb From ffa9f3ad058d85fa5a868f04d527c0ca5f1ac3f7 Mon Sep 17 00:00:00 2001 From: eynzhang Date: Thu, 19 Dec 2019 17:05:47 +0800 Subject: [PATCH 3/5] Create .travis.yml --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..76efda9bf --- /dev/null +++ b/.travis.yml @@ -0,0 +1,2 @@ +language: csharp +solution: websocket-sharp.sln \ No newline at end of file From 351de3b7b1500e374baca991386026fca6d164fe Mon Sep 17 00:00:00 2001 From: eynzhang Date: Tue, 21 Jan 2020 09:50:50 +0800 Subject: [PATCH 4/5] Add NoLog level so client can disable log output --- websocket-sharp/LogLevel.cs | 7 ++++++- websocket-sharp/Logger.cs | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/websocket-sharp/LogLevel.cs b/websocket-sharp/LogLevel.cs index ef9967728..220082dd5 100644 --- a/websocket-sharp/LogLevel.cs +++ b/websocket-sharp/LogLevel.cs @@ -58,6 +58,11 @@ public enum LogLevel /// /// Specifies the top logging level. /// - Fatal + Fatal, + + /// + /// No log + /// + None } } diff --git a/websocket-sharp/Logger.cs b/websocket-sharp/Logger.cs index 17850e67e..67e4a6222 100644 --- a/websocket-sharp/Logger.cs +++ b/websocket-sharp/Logger.cs @@ -263,11 +263,18 @@ public void Error (string message) /// /// Outputs as a log with . /// + /// + /// If the current logging level is higher than , + /// this method doesn't output as a log. + /// /// /// A that represents the message to output as a log. /// public void Fatal (string message) { + if (_level > LogLevel.Fatal) + return; + output (message, LogLevel.Fatal); } From c50720edeed7143e0af11a67f4361b1a91d2dacd Mon Sep 17 00:00:00 2001 From: eynzhang Date: Tue, 21 Jan 2020 09:55:11 +0800 Subject: [PATCH 5/5] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 4edcc63e5..50a503bf8 100644 --- a/README.md +++ b/README.md @@ -647,6 +647,12 @@ And if you would like to output a log, you should use any of the output methods. ws.Log.Debug ("This is a debug message."); ``` +If you would like to disable all log output, you can specify the `None` enum. + +```csharp +ws.Log.Level = LogLevel.None; +``` + The `WebSocketServer` and `HttpServer` classes have the same logging function. ## Examples ##