Added copyright
This commit is contained in:
parent
32c2491d25
commit
6d2405502f
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue