Fix nullable warning in FReceivedPacketView
This commit is contained in:
@@ -33,13 +33,11 @@ public class FReceiveThreadRunnable : IAsyncDisposable
|
|||||||
{
|
{
|
||||||
if (_receiveQueue.TryDequeue(out var packet))
|
if (_receiveQueue.TryDequeue(out var packet))
|
||||||
{
|
{
|
||||||
result = new FReceivedPacketView
|
result = new FReceivedPacketView(
|
||||||
{
|
new FPacketDataView(packet.Buffer, packet.Buffer.Length),
|
||||||
DataView = new FPacketDataView(packet.Buffer, packet.Buffer.Length),
|
packet.Address,
|
||||||
Address = packet.Address,
|
new FInPacketTraits());
|
||||||
Traits = new FInPacketTraits()
|
|
||||||
};
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,13 @@ public class FPacketDataView
|
|||||||
|
|
||||||
public class FReceivedPacketView
|
public class FReceivedPacketView
|
||||||
{
|
{
|
||||||
|
public FReceivedPacketView(FPacketDataView dataView, IPEndPoint address, FInPacketTraits traits)
|
||||||
|
{
|
||||||
|
DataView = dataView;
|
||||||
|
Address = address;
|
||||||
|
Traits = traits;
|
||||||
|
}
|
||||||
|
|
||||||
public FPacketDataView DataView { get; set; }
|
public FPacketDataView DataView { get; set; }
|
||||||
public IPEndPoint Address { get; set; }
|
public IPEndPoint Address { get; set; }
|
||||||
public FInPacketTraits Traits { get; set; }
|
public FInPacketTraits Traits { get; set; }
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class UIpNetDriver : UNetDriver
|
|||||||
|
|
||||||
while (ReceiveThread.TryReceive(out var packet))
|
while (ReceiveThread.TryReceive(out var packet))
|
||||||
{
|
{
|
||||||
Logger.Information("Received {Buffer} from {Adress}", packet.DataView.GetData(), packet.Address);
|
Logger.Information("Received from {Adress} data {Buffer}", packet.Address, packet.DataView.GetData());
|
||||||
|
|
||||||
UNetConnection? connection = null;
|
UNetConnection? connection = null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user