2023-01-17 12:04:24 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#include "Modules/ModuleManager.h"
|
|
|
|
|
#include "Modules/ModuleInterface.h"
|
|
|
|
|
#include "IConcertTransportModule.h"
|
|
|
|
|
|
|
|
|
|
#include "IConcertClientModule.h"
|
|
|
|
|
|
|
|
|
|
#include "ConcertClient.h"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Implements the Concert Client module
|
|
|
|
|
*/
|
|
|
|
|
class FConcertClientModule : public IConcertClientModule
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
virtual void StartupModule() override
|
|
|
|
|
{
|
|
|
|
|
EndpointProvider = IConcertTransportModule::Get().CreateEndpointProvider();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void ShutdownModule() override
|
|
|
|
|
{
|
|
|
|
|
EndpointProvider.Reset();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual IConcertClientRef CreateClient(const FString& InRole) override
|
|
|
|
|
{
|
|
|
|
|
return MakeShared<FConcertClient, ESPMode::ThreadSafe>(InRole, EndpointProvider);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
TSharedPtr<IConcertEndpointProvider> EndpointProvider;
|
|
|
|
|
};
|
|
|
|
|
|
2023-02-08 18:08:20 -05:00
|
|
|
IMPLEMENT_MODULE(FConcertClientModule, ConcertClient)
|