mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-17 13:44:46 +00:00
feat: Created new GenericSecureTcpIpClient from GenericSecureTcpIpClient_ForServer, implementing ISocektStatusWithStreamDebugging. chore: Added JsonProperty decorators to TcpClientConfigObject.cs.
This commit is contained in:
1048
Pepperdash Core/Pepperdash Core/Comm/GenericSecureTcpIpClient.cs
Normal file
1048
Pepperdash Core/Pepperdash Core/Comm/GenericSecureTcpIpClient.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using PepperDash.Core;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
namespace PepperDash.Core
|
namespace PepperDash.Core
|
||||||
{
|
{
|
||||||
@@ -16,36 +10,50 @@ namespace PepperDash.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// TcpSsh Properties
|
/// TcpSsh Properties
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("control")]
|
||||||
public ControlPropertiesConfig Control { get; set; }
|
public ControlPropertiesConfig Control { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bool value for secure. Currently not implemented in TCP sockets as they are not dynamic
|
/// Bool value for secure. Currently not implemented in TCP sockets as they are not dynamic
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("secure")]
|
||||||
public bool Secure { get; set; }
|
public bool Secure { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Require a shared key that both server and client negotiate. If negotiation fails server disconnects the client
|
/// Require a shared key that both server and client negotiate. If negotiation fails server disconnects the client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("sharedKeyRequired")]
|
||||||
public bool SharedKeyRequired { get; set; }
|
public bool SharedKeyRequired { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The shared key that must match on the server and client
|
/// The shared key that must match on the server and client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("sharedKey")]
|
||||||
public string SharedKey { get; set; }
|
public string SharedKey { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Require a heartbeat on the client/server connection that will cause the server/client to disconnect if the heartbeat is not received.
|
/// Require a heartbeat on the client/server connection that will cause the server/client to disconnect if the heartbeat is not received.
|
||||||
/// heartbeats do not raise received events.
|
/// heartbeats do not raise received events.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("heartbeatRequired")]
|
||||||
public bool HeartbeatRequired { get; set; }
|
public bool HeartbeatRequired { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The interval in seconds for the heartbeat from the client. If not received client is disconnected
|
/// The interval in seconds for the heartbeat from the client. If not received client is disconnected
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("heartbeatRequiredIntervalInSeconds")]
|
||||||
public ushort HeartbeatRequiredIntervalInSeconds { get; set; }
|
public ushort HeartbeatRequiredIntervalInSeconds { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// HeartbeatString that will be checked against the message received. defaults to heartbeat if no string is provided.
|
/// HeartbeatString that will be checked against the message received. defaults to heartbeat if no string is provided.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("heartbeatStringToMatch")]
|
||||||
public string HeartbeatStringToMatch { get; set; }
|
public string HeartbeatStringToMatch { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Receive Queue size must be greater than 20 or defaults to 20
|
/// Receive Queue size must be greater than 20 or defaults to 20
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("receiveQueueSize")]
|
||||||
public int ReceiveQueueSize { get; set; }
|
public int ReceiveQueueSize { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -71,6 +71,7 @@
|
|||||||
<Compile Include="CommunicationExtras.cs" />
|
<Compile Include="CommunicationExtras.cs" />
|
||||||
<Compile Include="Comm\CommunicationStreamDebugging.cs" />
|
<Compile Include="Comm\CommunicationStreamDebugging.cs" />
|
||||||
<Compile Include="Comm\ControlPropertiesConfig.cs" />
|
<Compile Include="Comm\ControlPropertiesConfig.cs" />
|
||||||
|
<Compile Include="Comm\GenericSecureTcpIpClient.cs" />
|
||||||
<Compile Include="Comm\GenericTcpIpClient_ForServer.cs" />
|
<Compile Include="Comm\GenericTcpIpClient_ForServer.cs" />
|
||||||
<Compile Include="Comm\GenericHttpSseClient.cs" />
|
<Compile Include="Comm\GenericHttpSseClient.cs" />
|
||||||
<Compile Include="Comm\GenericSecureTcpIpServer.cs" />
|
<Compile Include="Comm\GenericSecureTcpIpServer.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user