Fix nullable warning in FReceivedPacketView
This commit is contained in:
@@ -33,12 +33,10 @@ public class FReceiveThreadRunnable : IAsyncDisposable
|
||||
{
|
||||
if (_receiveQueue.TryDequeue(out var packet))
|
||||
{
|
||||
result = new FReceivedPacketView
|
||||
{
|
||||
DataView = new FPacketDataView(packet.Buffer, packet.Buffer.Length),
|
||||
Address = packet.Address,
|
||||
Traits = new FInPacketTraits()
|
||||
};
|
||||
result = new FReceivedPacketView(
|
||||
new FPacketDataView(packet.Buffer, packet.Buffer.Length),
|
||||
packet.Address,
|
||||
new FInPacketTraits());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,13 @@ public class FPacketDataView
|
||||
|
||||
public class FReceivedPacketView
|
||||
{
|
||||
public FReceivedPacketView(FPacketDataView dataView, IPEndPoint address, FInPacketTraits traits)
|
||||
{
|
||||
DataView = dataView;
|
||||
Address = address;
|
||||
Traits = traits;
|
||||
}
|
||||
|
||||
public FPacketDataView DataView { get; set; }
|
||||
public IPEndPoint Address { get; set; }
|
||||
public FInPacketTraits Traits { get; set; }
|
||||
|
||||
@@ -39,7 +39,7 @@ public class UIpNetDriver : UNetDriver
|
||||
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user