mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-14 20:24:46 +00:00
fix: (PepperDash Core) Fix issue with stream debugging and bytes received
Also fixed some spelling errors and added length info to the received messages for UDP, TCP, and SSH clients
This commit is contained in:
@@ -266,19 +266,21 @@ namespace PepperDash.Core
|
||||
Debug.Console(2, this, "Bytes: {0}", bytes.ToString());
|
||||
var bytesHandler = BytesReceived;
|
||||
if (bytesHandler != null)
|
||||
{
|
||||
if (StreamDebugging.RxStreamDebuggingIsEnabled)
|
||||
{
|
||||
Debug.Console(0, this, "Received {1} bytes: '{0}'", ComTextHelper.GetEscapedText(bytes), bytes.Length);
|
||||
}
|
||||
bytesHandler(this, new GenericCommMethodReceiveBytesArgs(bytes));
|
||||
else
|
||||
Debug.Console(2, this, "bytesHandler is null");
|
||||
}
|
||||
var textHandler = TextReceived;
|
||||
if (textHandler != null)
|
||||
{
|
||||
if (StreamDebugging.RxStreamDebuggingIsEnabled)
|
||||
Debug.Console(0, this, "Recevied: '{0}'", str);
|
||||
Debug.Console(0, this, "Received {1} characters of text: '{0}'", ComTextHelper.GetDebugText(str), str.Length);
|
||||
|
||||
textHandler(this, new GenericCommMethodReceiveTextArgs(str));
|
||||
}
|
||||
else
|
||||
Debug.Console(2, this, "textHandler is null");
|
||||
}
|
||||
server.ReceiveDataAsync(Receive);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user