mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-15 20:54:46 +00:00
Merge remote-tracking branch 'origin/bugfix/PDC-29_SshIssues' into HEAD
This commit is contained in:
@@ -76,6 +76,14 @@ namespace PepperDash.Core
|
|||||||
public class GenericTcpServerCommMethodReceiveTextArgs : EventArgs
|
public class GenericTcpServerCommMethodReceiveTextArgs : EventArgs
|
||||||
{
|
{
|
||||||
public uint ReceivedFromClientIndex { get; private set; }
|
public uint ReceivedFromClientIndex { get; private set; }
|
||||||
|
public ushort ReceivedFromClientIndexShort
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (ushort)ReceivedFromClientIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string Text { get; private set; }
|
public string Text { get; private set; }
|
||||||
|
|
||||||
public GenericTcpServerCommMethodReceiveTextArgs(string text)
|
public GenericTcpServerCommMethodReceiveTextArgs(string text)
|
||||||
|
|||||||
@@ -221,7 +221,12 @@ namespace PepperDash.Core
|
|||||||
|
|
||||||
Debug.Console(1, this, "Creating new SshClient");
|
Debug.Console(1, this, "Creating new SshClient");
|
||||||
ConnectionInfo connectionInfo = new ConnectionInfo(Hostname, Port, Username, pauth, kauth);
|
ConnectionInfo connectionInfo = new ConnectionInfo(Hostname, Port, Username, pauth, kauth);
|
||||||
Client = new SshClient(connectionInfo);
|
|
||||||
|
if (Client == null)
|
||||||
|
{
|
||||||
|
Client = new SshClient(connectionInfo);
|
||||||
|
}
|
||||||
|
Client.ErrorOccurred -= Client_ErrorOccurred;
|
||||||
Client.ErrorOccurred += Client_ErrorOccurred;
|
Client.ErrorOccurred += Client_ErrorOccurred;
|
||||||
|
|
||||||
//You can do it!
|
//You can do it!
|
||||||
|
|||||||
@@ -250,8 +250,6 @@ namespace PepperDash.Core
|
|||||||
|
|
||||||
if (Client == null)
|
if (Client == null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
Client = new TCPClient(Hostname, Port, BufferSize);
|
Client = new TCPClient(Hostname, Port, BufferSize);
|
||||||
Client.SocketStatusChange += Client_SocketStatusChange;
|
Client.SocketStatusChange += Client_SocketStatusChange;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user