You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb trivial #preflight 647107780a6634dbb236a0a6 [CL 25651638 by kirill zorin in ue5-main branch]
32 lines
1.0 KiB
C++
32 lines
1.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "CookOnTheFlyNetServer.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "TCPServer.h"
|
|
#include "PlatformProtocolServer.h"
|
|
|
|
DEFINE_LOG_CATEGORY(LogCookOnTheFlyNetworkServer);
|
|
|
|
class FCookOnTheFlyNetworkServerModule final
|
|
: public UE::Cook::ICookOnTheFlyNetworkServerModule
|
|
{
|
|
public:
|
|
virtual TSharedPtr<UE::Cook::ICookOnTheFlyNetworkServer> CreateServer(const UE::Cook::FCookOnTheFlyNetworkServerOptions& Options) override
|
|
{
|
|
using namespace UE::Cook;
|
|
|
|
switch (Options.Protocol)
|
|
{
|
|
case ECookOnTheFlyNetworkServerProtocol::Tcp:
|
|
return MakeShared<FCookOnTheFlyServerTCP>(Options.Port, Options.TargetPlatforms);
|
|
case ECookOnTheFlyNetworkServerProtocol::Platform:
|
|
return MakeShared<FCookOnTheFlyServerPlatformProtocol>(Options.TargetPlatforms);
|
|
default:
|
|
UE_LOG(LogCookOnTheFlyNetworkServer, Fatal, TEXT("Unsupported protocol: %d"), int(Options.Protocol));
|
|
return nullptr;
|
|
}
|
|
}
|
|
};
|
|
|
|
IMPLEMENT_MODULE(FCookOnTheFlyNetworkServerModule, CookOnTheFlyNetServer);
|