diff --git a/EonaCat.Connections.Client/Program.cs b/EonaCat.Connections.Client/Program.cs index f6bfa15..520f5a9 100644 --- a/EonaCat.Connections.Client/Program.cs +++ b/EonaCat.Connections.Client/Program.cs @@ -1,9 +1,10 @@ -using EonaCat.Connections; -using EonaCat.Connections.Models; -using System.Text; +using EonaCat.Connections.Models; namespace EonaCat.Connections.Client.Example { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public class Program { private static NetworkClient _client; @@ -16,6 +17,7 @@ namespace EonaCat.Connections.Client.Example { Console.Write("Enter message to send (or 'exit' to quit): "); var message = Console.ReadLine(); + if (!string.IsNullOrEmpty(message) && message.Equals("exit", StringComparison.OrdinalIgnoreCase)) { await _client.DisconnectAsync().ConfigureAwait(false); diff --git a/EonaCat.Connections.Server/Program.cs b/EonaCat.Connections.Server/Program.cs index 1247624..57efa1c 100644 --- a/EonaCat.Connections.Server/Program.cs +++ b/EonaCat.Connections.Server/Program.cs @@ -2,6 +2,9 @@ namespace EonaCat.Connections.Server.Example { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public class Program { private static NetworkServer _server; diff --git a/EonaCat.Connections/EventArguments/ConnectionEventArgs.cs b/EonaCat.Connections/EventArguments/ConnectionEventArgs.cs index 54b50ac..f8eb819 100644 --- a/EonaCat.Connections/EventArguments/ConnectionEventArgs.cs +++ b/EonaCat.Connections/EventArguments/ConnectionEventArgs.cs @@ -2,6 +2,9 @@ namespace EonaCat.Connections.EventArguments { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public class ConnectionEventArgs : EventArgs { public string ClientId { get; set; } diff --git a/EonaCat.Connections/EventArguments/DataReceivedEventArgs.cs b/EonaCat.Connections/EventArguments/DataReceivedEventArgs.cs index f6b2ef1..57763ea 100644 --- a/EonaCat.Connections/EventArguments/DataReceivedEventArgs.cs +++ b/EonaCat.Connections/EventArguments/DataReceivedEventArgs.cs @@ -2,6 +2,9 @@ namespace EonaCat.Connections { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public class DataReceivedEventArgs : EventArgs { public string ClientId { get; internal set; } diff --git a/EonaCat.Connections/EventArguments/ErrorEventArgs.cs b/EonaCat.Connections/EventArguments/ErrorEventArgs.cs index 839d75f..ad86f07 100644 --- a/EonaCat.Connections/EventArguments/ErrorEventArgs.cs +++ b/EonaCat.Connections/EventArguments/ErrorEventArgs.cs @@ -1,5 +1,8 @@ namespace EonaCat.Connections.EventArguments { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public class ErrorEventArgs : EventArgs { public string ClientId { get; set; } diff --git a/EonaCat.Connections/Helpers/AesKeyExchange.cs b/EonaCat.Connections/Helpers/AesKeyExchange.cs index 11ed60f..4807e65 100644 --- a/EonaCat.Connections/Helpers/AesKeyExchange.cs +++ b/EonaCat.Connections/Helpers/AesKeyExchange.cs @@ -3,6 +3,9 @@ using System.Text; namespace EonaCat.Connections.Helpers { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public static class AesKeyExchange { private static readonly string Pepper = "EonaCat.Connections.Salt"; diff --git a/EonaCat.Connections/Helpers/StringHelpers.cs b/EonaCat.Connections/Helpers/StringHelpers.cs index 00fe1af..f2c1a7c 100644 --- a/EonaCat.Connections/Helpers/StringHelpers.cs +++ b/EonaCat.Connections/Helpers/StringHelpers.cs @@ -2,6 +2,9 @@ { internal class StringHelper { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public static string GetTextBetweenTags(string message, string startTag, string endTag) { int startIndex = message.IndexOf(startTag); diff --git a/EonaCat.Connections/Models/Configuration.cs b/EonaCat.Connections/Models/Configuration.cs index 38c5650..9b239fe 100644 --- a/EonaCat.Connections/Models/Configuration.cs +++ b/EonaCat.Connections/Models/Configuration.cs @@ -4,6 +4,9 @@ using System.Security.Cryptography.X509Certificates; namespace EonaCat.Connections.Models { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public class Configuration { public bool EnableAutoReconnect { get; set; } = true; diff --git a/EonaCat.Connections/Models/Connection.cs b/EonaCat.Connections/Models/Connection.cs index 82f04cf..51f1625 100644 --- a/EonaCat.Connections/Models/Connection.cs +++ b/EonaCat.Connections/Models/Connection.cs @@ -4,6 +4,9 @@ using System.Security.Cryptography; namespace EonaCat.Connections.Models { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public class Connection { public string Id { get; set; } diff --git a/EonaCat.Connections/Models/Stats.cs b/EonaCat.Connections/Models/Stats.cs index 0112d4d..aa1150d 100644 --- a/EonaCat.Connections/Models/Stats.cs +++ b/EonaCat.Connections/Models/Stats.cs @@ -1,6 +1,8 @@ namespace EonaCat.Connections { - // Connection statistics + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public class Stats { public int ActiveConnections { get; set; } diff --git a/EonaCat.Connections/NetworkClient.cs b/EonaCat.Connections/NetworkClient.cs index afc0501..817bef5 100644 --- a/EonaCat.Connections/NetworkClient.cs +++ b/EonaCat.Connections/NetworkClient.cs @@ -11,6 +11,9 @@ using ErrorEventArgs = EonaCat.Connections.EventArguments.ErrorEventArgs; namespace EonaCat.Connections { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public class NetworkClient { private readonly Configuration _config; diff --git a/EonaCat.Connections/NetworkServer.cs b/EonaCat.Connections/NetworkServer.cs index d9f151c..47a983c 100644 --- a/EonaCat.Connections/NetworkServer.cs +++ b/EonaCat.Connections/NetworkServer.cs @@ -13,6 +13,9 @@ using ErrorEventArgs = EonaCat.Connections.EventArguments.ErrorEventArgs; namespace EonaCat.Connections { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public class NetworkServer { private readonly Configuration _config; diff --git a/EonaCat.Connections/Processors/JsonDataProcessor.cs b/EonaCat.Connections/Processors/JsonDataProcessor.cs index dab84cc..67a5670 100644 --- a/EonaCat.Connections/Processors/JsonDataProcessor.cs +++ b/EonaCat.Connections/Processors/JsonDataProcessor.cs @@ -7,6 +7,9 @@ using Timer = System.Timers.Timer; namespace EonaCat.Connections.Processors { + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public class JsonDataProcessor : IDisposable { public int MaxAllowedBufferSize = 20 * 1024 * 1024; diff --git a/EonaCat.Connections/ProtocolType.cs b/EonaCat.Connections/ProtocolType.cs index 1440cd1..217305b 100644 --- a/EonaCat.Connections/ProtocolType.cs +++ b/EonaCat.Connections/ProtocolType.cs @@ -1,6 +1,8 @@ namespace EonaCat.Connections { - // Protocol types + // This file is part of the EonaCat project(s) which is released under the Apache License. + // See the LICENSE file or go to https://EonaCat.com/license for full license details. + public enum ProtocolType { TCP,