Added copyright

This commit is contained in:
EonaCat 2025-08-21 19:10:42 +02:00
parent 32c2491d25
commit 6d2405502f
14 changed files with 44 additions and 5 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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; }

View File

@ -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; }

View File

@ -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; }

View File

@ -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";

View File

@ -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);

View File

@ -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;

View File

@ -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; }

View File

@ -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; }

View File

@ -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;

View File

@ -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;

View File

@ -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<TMessage> : IDisposable
{
public int MaxAllowedBufferSize = 20 * 1024 * 1024;

View File

@ -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,