mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-15 04:34:46 +00:00
Merge pull request #51 from PepperDash/hotfix/ssh-issues
Hotfix/ssh issues
This commit is contained in:
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@@ -144,10 +144,14 @@ jobs:
|
|||||||
uses: nuget/setup-nuget@v1
|
uses: nuget/setup-nuget@v1
|
||||||
- name: Add Github Packages source
|
- name: Add Github Packages source
|
||||||
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Add nuget.org API Key
|
||||||
|
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
||||||
- name: Create nuget package
|
- name: Create nuget package
|
||||||
run: nuget pack "./PepperDash_Core.nuspec" -version ${{ env.VERSION }}
|
run: nuget pack "./PepperDash_Core.nuspec" -version ${{ env.VERSION }}
|
||||||
- name: Publish nuget package to Github registry
|
- name: Publish nuget package to Github registry
|
||||||
run: nuget push **/*.nupkg -source github
|
run: nuget push **/*.nupkg -source github
|
||||||
|
- name: Publish nuget package to nuget.org
|
||||||
|
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
||||||
# This step always runs and pushes the build to the internal build rep
|
# This step always runs and pushes the build to the internal build rep
|
||||||
Internal_Push_Output:
|
Internal_Push_Output:
|
||||||
needs: Build_Project
|
needs: Build_Project
|
||||||
|
|||||||
@@ -119,10 +119,14 @@ jobs:
|
|||||||
uses: nuget/setup-nuget@v1
|
uses: nuget/setup-nuget@v1
|
||||||
- name: Add Github Packages source
|
- name: Add Github Packages source
|
||||||
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Add nuget.org API Key
|
||||||
|
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
||||||
- name: Create nuget package
|
- name: Create nuget package
|
||||||
run: nuget pack "./PepperDash_Core.nuspec" -version ${{ env.VERSION }}
|
run: nuget pack "./PepperDash_Core.nuspec" -version ${{ env.VERSION }}
|
||||||
- name: Publish nuget package to Github registry
|
- name: Publish nuget package to Github registry
|
||||||
run: nuget push **/*.nupkg -source github
|
run: nuget push **/*.nupkg -source github
|
||||||
|
- name: Publish nuget package to nuget.org
|
||||||
|
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
||||||
Internal_Push_Output:
|
Internal_Push_Output:
|
||||||
needs: Build_Project
|
needs: Build_Project
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
@@ -13,6 +13,7 @@ namespace PepperDash.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class GenericSshClient : Device, ISocketStatusWithStreamDebugging, IAutoReconnect
|
public class GenericSshClient : Device, ISocketStatusWithStreamDebugging, IAutoReconnect
|
||||||
{
|
{
|
||||||
|
private const string SPlusKey = "Uninitialized SshClient";
|
||||||
public CommunicationStreamDebugging StreamDebugging { get; private set; }
|
public CommunicationStreamDebugging StreamDebugging { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -155,8 +156,9 @@ namespace PepperDash.Core
|
|||||||
/// S+ Constructor - Must set all properties before calling Connect
|
/// S+ Constructor - Must set all properties before calling Connect
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GenericSshClient()
|
public GenericSshClient()
|
||||||
: base("Uninitialized SshClient")
|
: base(SPlusKey)
|
||||||
{
|
{
|
||||||
|
StreamDebugging = new CommunicationStreamDebugging(SPlusKey);
|
||||||
CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler);
|
CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler);
|
||||||
AutoReconnectIntervalMs = 5000;
|
AutoReconnectIntervalMs = 5000;
|
||||||
}
|
}
|
||||||
@@ -243,7 +245,7 @@ namespace PepperDash.Core
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Client.Connect();
|
Client.Connect();
|
||||||
TheStream = Client.CreateShellStream("PDTShell", 100, 80, 100, 200, 100000);
|
TheStream = Client.CreateShellStream("PDTShell", 100, 80, 100, 200, 65534);
|
||||||
TheStream.DataReceived += Stream_DataReceived;
|
TheStream.DataReceived += Stream_DataReceived;
|
||||||
//TheStream.ErrorOccurred += TheStream_ErrorOccurred;
|
//TheStream.ErrorOccurred += TheStream_ErrorOccurred;
|
||||||
Debug.Console(1, this, "Connected");
|
Debug.Console(1, this, "Connected");
|
||||||
@@ -437,8 +439,11 @@ namespace PepperDash.Core
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Debug.Console(0, "Exception: {0}", ex.Message);
|
||||||
|
Debug.Console(0, "Stack Trace: {0}", ex.StackTrace);
|
||||||
|
|
||||||
Debug.Console(1, this, "Stream write failed. Disconnected, closing");
|
Debug.Console(1, this, "Stream write failed. Disconnected, closing");
|
||||||
ClientStatus = SocketStatus.SOCKET_STATUS_BROKEN_REMOTELY;
|
ClientStatus = SocketStatus.SOCKET_STATUS_BROKEN_REMOTELY;
|
||||||
HandleConnectionFailure();
|
HandleConnectionFailure();
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ namespace PepperDash.Core
|
|||||||
/// A class to handle basic TCP/IP communications with a server
|
/// A class to handle basic TCP/IP communications with a server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GenericTcpIpClient : Device, ISocketStatusWithStreamDebugging, IAutoReconnect
|
public class GenericTcpIpClient : Device, ISocketStatusWithStreamDebugging, IAutoReconnect
|
||||||
{
|
{
|
||||||
|
private const string SplusKey = "Uninitialized TcpIpClient";
|
||||||
public CommunicationStreamDebugging StreamDebugging { get; private set; }
|
public CommunicationStreamDebugging StreamDebugging { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -204,8 +205,9 @@ namespace PepperDash.Core
|
|||||||
/// Default constructor for S+
|
/// Default constructor for S+
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GenericTcpIpClient()
|
public GenericTcpIpClient()
|
||||||
: base("Uninitialized TcpIpClient")
|
: base(SplusKey)
|
||||||
{
|
{
|
||||||
|
StreamDebugging = new CommunicationStreamDebugging(SplusKey);
|
||||||
CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler);
|
CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler);
|
||||||
AutoReconnectIntervalMs = 5000;
|
AutoReconnectIntervalMs = 5000;
|
||||||
BufferSize = 2000;
|
BufferSize = 2000;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ namespace PepperDash.Core
|
|||||||
{
|
{
|
||||||
public class GenericUdpServer : Device, ISocketStatusWithStreamDebugging
|
public class GenericUdpServer : Device, ISocketStatusWithStreamDebugging
|
||||||
{
|
{
|
||||||
|
private const string SplusKey = "Uninitialized Udp Server";
|
||||||
public CommunicationStreamDebugging StreamDebugging { get; private set; }
|
public CommunicationStreamDebugging StreamDebugging { get; private set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
@@ -119,8 +120,9 @@ namespace PepperDash.Core
|
|||||||
/// Constructor for S+. Make sure to set key, address, port, and buffersize using init method
|
/// Constructor for S+. Make sure to set key, address, port, and buffersize using init method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GenericUdpServer()
|
public GenericUdpServer()
|
||||||
: base("Uninitialized Udp Server")
|
: base(SplusKey)
|
||||||
{
|
{
|
||||||
|
StreamDebugging = new CommunicationStreamDebugging(SplusKey);
|
||||||
BufferSize = 5000;
|
BufferSize = 5000;
|
||||||
DequeueLock = new CCriticalSection();
|
DequeueLock = new CCriticalSection();
|
||||||
MessageQueue = new CrestronQueue<GenericUdpReceiveTextExtraArgs>();
|
MessageQueue = new CrestronQueue<GenericUdpReceiveTextExtraArgs>();
|
||||||
|
|||||||
Reference in New Issue
Block a user