整理部分底层代码
This commit is contained in:
@@ -69,7 +69,7 @@ public abstract class ReadWriteDevicesUdpSessionBase : ReadWriteDevicesBase
|
||||
/// <inheritdoc/>
|
||||
public override string ToString()
|
||||
{
|
||||
return UdpSession.RemoteIPHost.ToString();
|
||||
return UdpSession.RemoteIPHost?.ToString();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
@@ -53,7 +53,7 @@ public abstract class ReadWriteDevicesUdpDataHandleAdapter<TRequest> : UdpDataHa
|
||||
/// <inheritdoc/>
|
||||
public override string ToString()
|
||||
{
|
||||
return (Owner as UdpSession)?.RemoteIPHost.ToString();
|
||||
return (Owner as UdpSession)?.RemoteIPHost?.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -83,11 +83,11 @@ public abstract class ReadWriteDevicesUdpDataHandleAdapter<TRequest> : UdpDataHa
|
||||
var allBytes = byteBlock.ToArray(0, byteBlock.Len);
|
||||
Logger?.Trace($"{FoundationConst.LogMessageHeader}{ToString()}- 接收:{(IsHexData ? allBytes.ToHexString(' ') : Encoding.UTF8.GetString(allBytes))}");
|
||||
|
||||
if (Request?.SendBytes == null)
|
||||
{
|
||||
GoReceived(remoteEndPoint, byteBlock, null);
|
||||
return;
|
||||
}
|
||||
//if (Request?.SendBytes == null)
|
||||
//{
|
||||
// GoReceived(remoteEndPoint, byteBlock, null);
|
||||
// return;
|
||||
//}
|
||||
byte[] header = new byte[] { };
|
||||
if (Request.HeadBytesLength > 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user