docs: add XML documentation to PepperDash.Core project

Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-07-22 15:48:23 +00:00
parent eeb0e84dc7
commit 260677a37f
59 changed files with 1072 additions and 5 deletions

View File

@@ -88,6 +88,9 @@ namespace PepperDash.Core
/// Disconnects this gather from the Port's TextReceived event. This will not fire LineReceived
/// after the this call.
/// </summary>
/// <summary>
/// Stop method
/// </summary>
public void Stop()
{
Port.TextReceived -= Port_TextReceived;

View File

@@ -25,6 +25,9 @@ namespace PepperDash.Core
/// <summary>
/// The current debug setting
/// </summary>
/// <summary>
/// Gets or sets the DebugSetting
/// </summary>
public eStreamDebuggingSetting DebugSetting { get; private set; }
private uint _DebugTimeoutInMs;
@@ -44,6 +47,9 @@ namespace PepperDash.Core
/// <summary>
/// Indicates that receive stream debugging is enabled
/// </summary>
/// <summary>
/// Gets or sets the RxStreamDebuggingIsEnabled
/// </summary>
public bool RxStreamDebuggingIsEnabled{ get; private set; }
/// <summary>
@@ -65,6 +71,9 @@ namespace PepperDash.Core
/// Sets the debugging setting and if not setting to off, assumes the default of 30 mintues
/// </summary>
/// <param name="setting"></param>
/// <summary>
/// SetDebuggingWithDefaultTimeout method
/// </summary>
public void SetDebuggingWithDefaultTimeout(eStreamDebuggingSetting setting)
{
if (setting == eStreamDebuggingSetting.Off)
@@ -81,6 +90,9 @@ namespace PepperDash.Core
/// </summary>
/// <param name="setting"></param>
/// <param name="minutes"></param>
/// <summary>
/// SetDebuggingWithSpecificTimeout method
/// </summary>
public void SetDebuggingWithSpecificTimeout(eStreamDebuggingSetting setting, uint minutes)
{
if (setting == eStreamDebuggingSetting.Off)
@@ -135,6 +147,9 @@ namespace PepperDash.Core
/// The available settings for stream debugging
/// </summary>
[Flags]
/// <summary>
/// Enumeration of eStreamDebuggingSetting values
/// </summary>
public enum eStreamDebuggingSetting
{
/// <summary>

View File

@@ -8,6 +8,9 @@ namespace PepperDash.Core
/// <summary>
/// Config properties that indicate how to communicate with a device for control
/// </summary>
/// <summary>
/// Represents a ControlPropertiesConfig
/// </summary>
public class ControlPropertiesConfig
{
/// <summary>

View File

@@ -32,6 +32,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// Gets or sets the Client
/// </summary>
public ISocketStatus Client { get; private set; }
/// <summary>
@@ -62,6 +65,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// Gets or sets the State
/// </summary>
public ServerState State { get; private set; }
/// <summary>
@@ -156,6 +162,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// Gets or sets the Text
/// </summary>
public string Text { get; private set; }
/// <summary>

View File

@@ -81,6 +81,9 @@ namespace PepperDash.Core
/// <summary>
/// Port on server
/// </summary>
/// <summary>
/// Gets or sets the Port
/// </summary>
public int Port { get; set; }
/// <summary>
@@ -151,6 +154,9 @@ namespace PepperDash.Core
/// <summary>
/// bool to track if auto reconnect should be set on the socket
/// </summary>
/// <summary>
/// Gets or sets the AutoReconnect
/// </summary>
public bool AutoReconnect { get; set; }
/// <summary>
@@ -190,6 +196,9 @@ namespace PepperDash.Core
/// <summary>
/// Bool to show whether the server requires a preshared key. This is used in the DynamicTCPServer class
/// </summary>
/// <summary>
/// Gets or sets the SharedKeyRequired
/// </summary>
public bool SharedKeyRequired { get; set; }
/// <summary>
@@ -209,6 +218,9 @@ namespace PepperDash.Core
/// <summary>
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module
/// </summary>
/// <summary>
/// Gets or sets the SharedKey
/// </summary>
public string SharedKey { get; set; }
/// <summary>
@@ -224,6 +236,9 @@ namespace PepperDash.Core
/// <summary>
/// Bool showing if socket is ready for communication after shared key exchange
/// </summary>
/// <summary>
/// Gets or sets the IsReadyForCommunication
/// </summary>
public bool IsReadyForCommunication { get; set; }
/// <summary>
@@ -344,6 +359,9 @@ namespace PepperDash.Core
/// <summary>
/// Just to help S+ set the key
/// </summary>
/// <summary>
/// Initialize method
/// </summary>
public void Initialize(string key)
{
Key = key;
@@ -421,6 +439,9 @@ namespace PepperDash.Core
/// Deactivate the client
/// </summary>
/// <returns></returns>
/// <summary>
/// Deactivate method
/// </summary>
public override bool Deactivate()
{
if (_client != null)
@@ -434,6 +455,9 @@ namespace PepperDash.Core
/// <summary>
/// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name.
/// </summary>
/// <summary>
/// Connect method
/// </summary>
public void Connect()
{
ConnectionCount++;
@@ -565,6 +589,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// Disconnect method
/// </summary>
public void Disconnect()
{
this.LogVerbose("Disconnect Called");
@@ -588,6 +615,9 @@ namespace PepperDash.Core
/// <summary>
/// Does the actual disconnect business
/// </summary>
/// <summary>
/// DisconnectClient method
/// </summary>
public void DisconnectClient()
{
if (_client == null) return;
@@ -848,6 +878,9 @@ namespace PepperDash.Core
/// <summary>
/// General send method
/// </summary>
/// <summary>
/// SendText method
/// </summary>
public void SendText(string text)
{
if (!string.IsNullOrEmpty(text))
@@ -877,6 +910,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// SendBytes method
/// </summary>
public void SendBytes(byte[] bytes)
{
if (bytes.Length > 0)

View File

@@ -82,6 +82,9 @@ namespace PepperDash.Core
/// <summary>
/// Port on server
/// </summary>
/// <summary>
/// Gets or sets the Port
/// </summary>
public int Port { get; set; }
/// <summary>
@@ -115,6 +118,9 @@ namespace PepperDash.Core
/// <summary>
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module
/// </summary>
/// <summary>
/// Gets or sets the SharedKey
/// </summary>
public string SharedKey { get; set; }
/// <summary>
@@ -125,6 +131,9 @@ namespace PepperDash.Core
/// <summary>
/// Defaults to 2000
/// </summary>
/// <summary>
/// Gets or sets the BufferSize
/// </summary>
public int BufferSize { get; set; }
/// <summary>
@@ -338,6 +347,9 @@ namespace PepperDash.Core
/// <summary>
/// Just to help S+ set the key
/// </summary>
/// <summary>
/// Initialize method
/// </summary>
public void Initialize(string key)
{
Key = key;
@@ -397,6 +409,9 @@ namespace PepperDash.Core
/// <summary>
/// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name.
/// </summary>
/// <summary>
/// Connect method
/// </summary>
public void Connect()
{
ConnectionCount++;
@@ -528,6 +543,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// Disconnect method
/// </summary>
public void Disconnect()
{
this.LogVerbose("Disconnect Called");
@@ -806,6 +824,9 @@ namespace PepperDash.Core
/// <summary>
/// General send method
/// </summary>
/// <summary>
/// SendText method
/// </summary>
public void SendText(string text)
{
if (!string.IsNullOrEmpty(text))
@@ -835,6 +856,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// SendBytes method
/// </summary>
public void SendBytes(byte[] bytes)
{
if (bytes.Length > 0)

View File

@@ -60,6 +60,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// Delegate for ServerHasChokedCallbackDelegate
/// </summary>
public delegate void ServerHasChokedCallbackDelegate();
#endregion
@@ -106,6 +109,9 @@ namespace PepperDash.Core
/// <summary>
/// 3 by default
/// </summary>
/// <summary>
/// Gets or sets the MonitorClientMaxFailureCount
/// </summary>
public int MonitorClientMaxFailureCount { get; set; }
/// <summary>
@@ -192,6 +198,9 @@ namespace PepperDash.Core
/// <summary>
/// Port Server should listen on
/// </summary>
/// <summary>
/// Gets or sets the Port
/// </summary>
public int Port { get; set; }
/// <summary>
@@ -226,6 +235,9 @@ namespace PepperDash.Core
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module.
/// If SharedKey changes while server is listening or clients are connected, disconnect and stop listening will be called
/// </summary>
/// <summary>
/// Gets or sets the SharedKey
/// </summary>
public string SharedKey { get; set; }
/// <summary>
@@ -250,6 +262,9 @@ namespace PepperDash.Core
/// <summary>
/// Milliseconds before server expects another heartbeat. Set by property HeartbeatRequiredIntervalInSeconds which is driven from S+
/// </summary>
/// <summary>
/// Gets or sets the HeartbeatRequiredIntervalMs
/// </summary>
public int HeartbeatRequiredIntervalMs { get; set; }
/// <summary>
@@ -260,6 +275,9 @@ namespace PepperDash.Core
/// <summary>
/// String to Match for heartbeat. If null or empty any string will reset heartbeat timer
/// </summary>
/// <summary>
/// Gets or sets the HeartbeatStringToMatch
/// </summary>
public string HeartbeatStringToMatch { get; set; }
//private timers for Heartbeats per client
@@ -278,6 +296,9 @@ namespace PepperDash.Core
/// <summary>
/// Defaults to 2000
/// </summary>
/// <summary>
/// Gets or sets the BufferSize
/// </summary>
public int BufferSize { get; set; }
/// <summary>
@@ -341,6 +362,9 @@ namespace PepperDash.Core
/// <summary>
/// Disconnects all clients and stops the server
/// </summary>
/// <summary>
/// KillServer method
/// </summary>
public void KillServer()
{
ServerStopped = true;
@@ -356,6 +380,9 @@ namespace PepperDash.Core
/// Initialize Key for device using client name from SIMPL+. Called on Listen from SIMPL+
/// </summary>
/// <param name="key"></param>
/// <summary>
/// Initialize method
/// </summary>
public void Initialize(string key)
{
Key = key;
@@ -397,6 +424,9 @@ namespace PepperDash.Core
/// <summary>
/// Start listening on the specified port
/// </summary>
/// <summary>
/// Listen method
/// </summary>
public void Listen()
{
ServerCCSection.Enter();
@@ -455,6 +485,9 @@ namespace PepperDash.Core
/// <summary>
/// Stop Listeneing
/// </summary>
/// <summary>
/// StopListening method
/// </summary>
public void StopListening()
{
try
@@ -478,6 +511,9 @@ namespace PepperDash.Core
/// Disconnects Client
/// </summary>
/// <param name="client"></param>
/// <summary>
/// DisconnectClient method
/// </summary>
public void DisconnectClient(uint client)
{
try
@@ -493,6 +529,9 @@ namespace PepperDash.Core
/// <summary>
/// Disconnect All Clients
/// </summary>
/// <summary>
/// DisconnectAllClientsForShutdown method
/// </summary>
public void DisconnectAllClientsForShutdown()
{
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Disconnecting All Clients");
@@ -533,6 +572,9 @@ namespace PepperDash.Core
/// Broadcast text from server to all connected clients
/// </summary>
/// <param name="text"></param>
/// <summary>
/// BroadcastText method
/// </summary>
public void BroadcastText(string text)
{
CCriticalSection CCBroadcast = new CCriticalSection();
@@ -566,6 +608,9 @@ namespace PepperDash.Core
/// </summary>
/// <param name="text"></param>
/// <param name="clientIndex"></param>
/// <summary>
/// SendTextToClient method
/// </summary>
public void SendTextToClient(string text, uint clientIndex)
{
try
@@ -634,6 +679,9 @@ namespace PepperDash.Core
/// </summary>
/// <param name="clientIndex"></param>
/// <returns></returns>
/// <summary>
/// GetClientIPAddress method
/// </summary>
public string GetClientIPAddress(uint clientIndex)
{
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "GetClientIPAddress Index: {0}", clientIndex);

View File

@@ -44,6 +44,9 @@ namespace PepperDash.Core
/// <summary>
/// Address of server
/// </summary>
/// <summary>
/// Gets or sets the Hostname
/// </summary>
public string Hostname { get; set; }
/// <summary>
@@ -54,11 +57,17 @@ namespace PepperDash.Core
/// <summary>
/// Username for server
/// </summary>
/// <summary>
/// Gets or sets the Username
/// </summary>
public string Username { get; set; }
/// <summary>
/// And... Password for server. That was worth documenting!
/// </summary>
/// <summary>
/// Gets or sets the Password
/// </summary>
public string Password { get; set; }
/// <summary>
@@ -126,6 +135,9 @@ namespace PepperDash.Core
/// Millisecond value, determines the timeout period in between reconnect attempts.
/// Set to 5000 by default
/// </summary>
/// <summary>
/// Gets or sets the AutoReconnectIntervalMs
/// </summary>
public int AutoReconnectIntervalMs { get; set; }
SshClient Client;
@@ -200,6 +212,9 @@ namespace PepperDash.Core
/// <summary>
/// Connect to the server, using the provided properties.
/// </summary>
/// <summary>
/// Connect method
/// </summary>
public void Connect()
{
// Don't go unless everything is here
@@ -327,6 +342,9 @@ namespace PepperDash.Core
/// <summary>
/// Disconnect the clients and put away it's resources.
/// </summary>
/// <summary>
/// Disconnect method
/// </summary>
public void Disconnect()
{
ConnectEnabled = false;
@@ -476,6 +494,9 @@ namespace PepperDash.Core
/// Sends text to the server
/// </summary>
/// <param name="text"></param>
/// <summary>
/// SendText method
/// </summary>
public void SendText(string text)
{
try
@@ -513,6 +534,9 @@ namespace PepperDash.Core
/// Sends Bytes to the server
/// </summary>
/// <param name="bytes"></param>
/// <summary>
/// SendBytes method
/// </summary>
public void SendBytes(byte[] bytes)
{
try
@@ -551,6 +575,9 @@ namespace PepperDash.Core
/// <summary>
/// Fired when connection changes
/// </summary>
/// <summary>
/// Represents a SshConnectionChangeEventArgs
/// </summary>
public class SshConnectionChangeEventArgs : EventArgs
{
/// <summary>
@@ -561,16 +588,25 @@ public class SshConnectionChangeEventArgs : EventArgs
/// <summary>
/// Connection Status represented as a ushort
/// </summary>
/// <summary>
/// Gets or sets the UIsConnected
/// </summary>
public ushort UIsConnected { get { return (ushort)(Client.IsConnected ? 1 : 0); } }
/// <summary>
/// The client
/// </summary>
/// <summary>
/// Gets or sets the Client
/// </summary>
public GenericSshClient Client { get; private set; }
/// <summary>
/// Socket Status as represented by
/// </summary>
/// <summary>
/// Gets or sets the Status
/// </summary>
public ushort Status { get { return Client.UStatus; } }
/// <summary>

View File

@@ -61,6 +61,9 @@ namespace PepperDash.Core
/// <summary>
/// Port on server
/// </summary>
/// <summary>
/// Gets or sets the Port
/// </summary>
public int Port { get; set; }
/// <summary>
@@ -138,6 +141,9 @@ namespace PepperDash.Core
/// <summary>
/// bool to track if auto reconnect should be set on the socket
/// </summary>
/// <summary>
/// Gets or sets the AutoReconnect
/// </summary>
public bool AutoReconnect { get; set; }
/// <summary>
@@ -234,6 +240,9 @@ namespace PepperDash.Core
/// <summary>
/// Just to help S+ set the key
/// </summary>
/// <summary>
/// Initialize method
/// </summary>
public void Initialize(string key)
{
Key = key;
@@ -255,6 +264,9 @@ namespace PepperDash.Core
///
/// </summary>
/// <returns></returns>
/// <summary>
/// Deactivate method
/// </summary>
public override bool Deactivate()
{
RetryTimer.Stop();
@@ -270,6 +282,9 @@ namespace PepperDash.Core
/// <summary>
/// Attempts to connect to the server
/// </summary>
/// <summary>
/// Connect method
/// </summary>
public void Connect()
{
if (string.IsNullOrEmpty(Hostname))
@@ -337,6 +352,9 @@ namespace PepperDash.Core
/// <summary>
/// Attempts to disconnect the client
/// </summary>
/// <summary>
/// Disconnect method
/// </summary>
public void Disconnect()
{
try
@@ -357,6 +375,9 @@ namespace PepperDash.Core
/// <summary>
/// Does the actual disconnect business
/// </summary>
/// <summary>
/// DisconnectClient method
/// </summary>
public void DisconnectClient()
{
if (_client != null)
@@ -449,6 +470,9 @@ namespace PepperDash.Core
/// <summary>
/// General send method
/// </summary>
/// <summary>
/// SendText method
/// </summary>
public void SendText(string text)
{
var bytes = Encoding.GetEncoding(28591).GetBytes(text);
@@ -462,6 +486,9 @@ namespace PepperDash.Core
/// <summary>
/// This is useful from console and...?
/// </summary>
/// <summary>
/// SendEscapedText method
/// </summary>
public void SendEscapedText(string text)
{
var unescapedText = Regex.Replace(text, @"\\x([0-9a-fA-F][0-9a-fA-F])", s =>
@@ -476,6 +503,9 @@ namespace PepperDash.Core
/// Sends Bytes to the server
/// </summary>
/// <param name="bytes"></param>
/// <summary>
/// SendBytes method
/// </summary>
public void SendBytes(byte[] bytes)
{
if (StreamDebugging.TxStreamDebuggingIsEnabled)
@@ -511,6 +541,9 @@ namespace PepperDash.Core
/// <summary>
/// Configuration properties for TCP/SSH Connections
/// </summary>
/// <summary>
/// Represents a TcpSshPropertiesConfig
/// </summary>
public class TcpSshPropertiesConfig
{
/// <summary>
@@ -532,6 +565,9 @@ namespace PepperDash.Core
/// <summary>
/// Passord credential
/// </summary>
/// <summary>
/// Gets or sets the Password
/// </summary>
public string Password { get; set; }
/// <summary>
@@ -542,11 +578,17 @@ namespace PepperDash.Core
/// <summary>
/// Defaults to true
/// </summary>
/// <summary>
/// Gets or sets the AutoReconnect
/// </summary>
public bool AutoReconnect { get; set; }
/// <summary>
/// Defaults to 5000ms
/// </summary>
/// <summary>
/// Gets or sets the AutoReconnectIntervalMs
/// </summary>
public int AutoReconnectIntervalMs { get; set; }
/// <summary>

View File

@@ -71,6 +71,9 @@ namespace PepperDash.Core
/// <summary>
/// Port on server
/// </summary>
/// <summary>
/// Gets or sets the Port
/// </summary>
public int Port { get; set; }
/// <summary>
@@ -104,6 +107,9 @@ namespace PepperDash.Core
/// <summary>
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module
/// </summary>
/// <summary>
/// Gets or sets the SharedKey
/// </summary>
public string SharedKey { get; set; }
/// <summary>
@@ -114,6 +120,9 @@ namespace PepperDash.Core
/// <summary>
/// Defaults to 2000
/// </summary>
/// <summary>
/// Gets or sets the BufferSize
/// </summary>
public int BufferSize { get; set; }
/// <summary>
@@ -291,6 +300,9 @@ namespace PepperDash.Core
/// <summary>
/// Just to help S+ set the key
/// </summary>
/// <summary>
/// Initialize method
/// </summary>
public void Initialize(string key)
{
Key = key;
@@ -313,6 +325,9 @@ namespace PepperDash.Core
/// <summary>
/// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name.
/// </summary>
/// <summary>
/// Connect method
/// </summary>
public void Connect()
{
ConnectionCount++;
@@ -444,6 +459,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// Disconnect method
/// </summary>
public void Disconnect()
{
this.LogVerbose("Disconnect Called");
@@ -671,6 +689,9 @@ namespace PepperDash.Core
/// <summary>
/// General send method
/// </summary>
/// <summary>
/// SendText method
/// </summary>
public void SendText(string text)
{
if (!string.IsNullOrEmpty(text))
@@ -700,6 +721,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// SendBytes method
/// </summary>
public void SendBytes(byte[] bytes)
{
if (bytes.Length > 0)

View File

@@ -54,6 +54,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// Delegate for ServerHasChokedCallbackDelegate
/// </summary>
public delegate void ServerHasChokedCallbackDelegate();
#endregion
@@ -84,6 +87,9 @@ namespace PepperDash.Core
/// <summary>
/// 3 by default
/// </summary>
/// <summary>
/// Gets or sets the MonitorClientMaxFailureCount
/// </summary>
public int MonitorClientMaxFailureCount { get; set; }
/// <summary>
@@ -173,6 +179,9 @@ namespace PepperDash.Core
/// <summary>
/// Port Server should listen on
/// </summary>
/// <summary>
/// Gets or sets the Port
/// </summary>
public int Port { get; set; }
/// <summary>
@@ -207,6 +216,9 @@ namespace PepperDash.Core
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module.
/// If SharedKey changes while server is listening or clients are connected, disconnect and stop listening will be called
/// </summary>
/// <summary>
/// Gets or sets the SharedKey
/// </summary>
public string SharedKey { get; set; }
/// <summary>
@@ -231,6 +243,9 @@ namespace PepperDash.Core
/// <summary>
/// Milliseconds before server expects another heartbeat. Set by property HeartbeatRequiredIntervalInSeconds which is driven from S+
/// </summary>
/// <summary>
/// Gets or sets the HeartbeatRequiredIntervalMs
/// </summary>
public int HeartbeatRequiredIntervalMs { get; set; }
/// <summary>
@@ -241,6 +256,9 @@ namespace PepperDash.Core
/// <summary>
/// String to Match for heartbeat. If null or empty any string will reset heartbeat timer
/// </summary>
/// <summary>
/// Gets or sets the HeartbeatStringToMatch
/// </summary>
public string HeartbeatStringToMatch { get; set; }
//private timers for Heartbeats per client
@@ -259,6 +277,9 @@ namespace PepperDash.Core
/// <summary>
/// Defaults to 2000
/// </summary>
/// <summary>
/// Gets or sets the BufferSize
/// </summary>
public int BufferSize { get; set; }
/// <summary>
@@ -322,6 +343,9 @@ namespace PepperDash.Core
/// <summary>
/// Disconnects all clients and stops the server
/// </summary>
/// <summary>
/// KillServer method
/// </summary>
public void KillServer()
{
ServerStopped = true;
@@ -337,6 +361,9 @@ namespace PepperDash.Core
/// Initialize Key for device using client name from SIMPL+. Called on Listen from SIMPL+
/// </summary>
/// <param name="key"></param>
/// <summary>
/// Initialize method
/// </summary>
public void Initialize(string key)
{
Key = key;
@@ -377,6 +404,9 @@ namespace PepperDash.Core
/// <summary>
/// Start listening on the specified port
/// </summary>
/// <summary>
/// Listen method
/// </summary>
public void Listen()
{
ServerCCSection.Enter();
@@ -434,6 +464,9 @@ namespace PepperDash.Core
/// <summary>
/// Stop Listening
/// </summary>
/// <summary>
/// StopListening method
/// </summary>
public void StopListening()
{
try
@@ -457,6 +490,9 @@ namespace PepperDash.Core
/// Disconnects Client
/// </summary>
/// <param name="client"></param>
/// <summary>
/// DisconnectClient method
/// </summary>
public void DisconnectClient(uint client)
{
try
@@ -472,6 +508,9 @@ namespace PepperDash.Core
/// <summary>
/// Disconnect All Clients
/// </summary>
/// <summary>
/// DisconnectAllClientsForShutdown method
/// </summary>
public void DisconnectAllClientsForShutdown()
{
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Disconnecting All Clients");
@@ -512,6 +551,9 @@ namespace PepperDash.Core
/// Broadcast text from server to all connected clients
/// </summary>
/// <param name="text"></param>
/// <summary>
/// BroadcastText method
/// </summary>
public void BroadcastText(string text)
{
CCriticalSection CCBroadcast = new CCriticalSection();
@@ -545,6 +587,9 @@ namespace PepperDash.Core
/// </summary>
/// <param name="text"></param>
/// <param name="clientIndex"></param>
/// <summary>
/// SendTextToClient method
/// </summary>
public void SendTextToClient(string text, uint clientIndex)
{
try
@@ -613,6 +658,9 @@ namespace PepperDash.Core
/// </summary>
/// <param name="clientIndex"></param>
/// <returns>IP address of the client</returns>
/// <summary>
/// GetClientIPAddress method
/// </summary>
public string GetClientIPAddress(uint clientIndex)
{
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "GetClientIPAddress Index: {0}", clientIndex);

View File

@@ -150,6 +150,9 @@ namespace PepperDash.Core
/// <param name="key"></param>
/// <param name="address"></param>
/// <param name="port"></param>
/// <summary>
/// Initialize method
/// </summary>
public void Initialize(string key, string address, ushort port)
{
Key = key;
@@ -187,6 +190,9 @@ namespace PepperDash.Core
/// <summary>
/// Enables the UDP Server
/// </summary>
/// <summary>
/// Connect method
/// </summary>
public void Connect()
{
if (Server == null)
@@ -224,6 +230,9 @@ namespace PepperDash.Core
/// <summary>
/// Disabled the UDP Server
/// </summary>
/// <summary>
/// Disconnect method
/// </summary>
public void Disconnect()
{
if(Server != null)
@@ -292,6 +301,9 @@ namespace PepperDash.Core
/// General send method
/// </summary>
/// <param name="text"></param>
/// <summary>
/// SendText method
/// </summary>
public void SendText(string text)
{
var bytes = Encoding.GetEncoding(28591).GetBytes(text);
@@ -309,6 +321,9 @@ namespace PepperDash.Core
///
/// </summary>
/// <param name="bytes"></param>
/// <summary>
/// SendBytes method
/// </summary>
public void SendBytes(byte[] bytes)
{
if (StreamDebugging.TxStreamDebuggingIsEnabled)
@@ -323,6 +338,9 @@ namespace PepperDash.Core
/// <summary>
///
/// </summary>
/// <summary>
/// Represents a GenericUdpReceiveTextExtraArgs
/// </summary>
public class GenericUdpReceiveTextExtraArgs : EventArgs
{
/// <summary>

View File

@@ -5,6 +5,9 @@ namespace PepperDash.Core
/// <summary>
/// Client config object for TCP client with server that inherits from TcpSshPropertiesConfig and adds properties for shared key and heartbeat
/// </summary>
/// <summary>
/// Represents a TcpClientConfigObject
/// </summary>
public class TcpClientConfigObject
{
/// <summary>