psi icon indicating copy to clipboard operation
psi copied to clipboard

[Suggestion] Adding more debug info into TcpWriter.

Open AuMilliat opened this issue 5 months ago • 0 comments

It could be great to add a Trace.WriteLine() in TcpWriter in the Receive method in case networkStream is null (line 68)

if (this.networkStream != null)
{
    this.networkStream.Write(BitConverter.GetBytes(count), 0, sizeof(int));
    this.networkStream.Write(bytes, offset, count);
}
#if DEBUG
else
{
    Trace.WriteLine($"TcpWriter {name} trying to write while not connected!");
}
#endif

AuMilliat avatar May 13 '25 16:05 AuMilliat