Files
UnrealEngine/Engine/Plugins/Media/PixelStreaming2/Source/PixelStreaming2RTC/Private/EpicRtcWebsocketFactory.cpp
2025-05-18 13:04:45 +08:00

19 lines
566 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "EpicRtcWebsocketFactory.h"
namespace UE::PixelStreaming2
{
EpicRtcErrorCode FEpicRtcWebsocketFactory::CreateWebsocket(EpicRtcWebsocketInterface** OutWebsocket)
{
EpicRtcWebsocketInterface* Websocket = new FEpicRtcWebsocket(bSendKeepAlive, nullptr, OnMaxReconnectAttemptsExceeded);
// Because the ptr was created with new, we need to call AddRef ourself (ms spec compliant)
Websocket->AddRef();
*OutWebsocket = Websocket;
return EpicRtcErrorCode::Ok;
}
} // namespace UE::PixelStreaming2