You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Added some APIs to the plugin to support unit testing without needing a UWorld, actors, etc. #jira UE-182327 #rb mattias.hornlund #preflight 642da9944d26bcd1eb1200b9 [CL 24931730 by Ryan Gerleve in ue5-main branch]
29 lines
560 B
C++
29 lines
560 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "NetPredictionTestChannel.h"
|
|
#include "UObject/CoreNet.h"
|
|
|
|
namespace UE::Net::Private
|
|
{
|
|
|
|
void FNetPredictionTestChannel::Send(const FNetBitWriter& Writer)
|
|
{
|
|
DataBuffer.Enqueue(Writer);
|
|
}
|
|
|
|
bool FNetPredictionTestChannel::HasPendingData()
|
|
{
|
|
return !DataBuffer.IsEmpty();
|
|
}
|
|
|
|
FNetBitReader FNetPredictionTestChannel::Receive()
|
|
{
|
|
const FNetBitWriter& Writer = DataBuffer.Peek();
|
|
FNetBitReader Reader(nullptr, Writer.GetData(), Writer.GetNumBits());
|
|
|
|
DataBuffer.Pop();
|
|
|
|
return MoveTemp(Reader);
|
|
}
|
|
|
|
} |