Class Multiplay Game Server Subsystem

Subsystem responsible for communicating with the Multiplay SDK daemon.

Include
#include "MultiplayGameServerSubsystem.h"
Syntax
UCLASS()
class MULTIPLAYGAMESERVERSDK_API UMultiplayGameServerSubsystem : public UMultiplaySubsystemBase

Inherits from: MultiplaySubsystemBase.

Delegates

FAllocateDelegate

Declaration
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FAllocateDelegate, FMultiplayAllocation, Allocation)
Return Type

FMultiplayAllocation.

FDeallocateDelegate

Declaration
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDeallocateDelegate, FMultiplayDeallocation, Deallocation)
Return Type

FMultiplayDeallocation.

FReadyServerSuccessDelegate

Declaration
DECLARE_DYNAMIC_DELEGATE(FReadyServerSuccessDelegate)

FReadyServerFailureDelegate

Declaration
DECLARE_DYNAMIC_DELEGATE_OneParam(FReadyServerFailureDelegate, FMultiplayErrorResponse, ErrorResponse)
Return Type

FMultiplayErrorResponse.

FUnreadyServerSuccessDelegate

Declaration
DECLARE_DYNAMIC_DELEGATE(FUnreadyServerSuccessDelegate)

FUnreadyServerFailureDelegate

Declaration
DECLARE_DYNAMIC_DELEGATE_OneParam(FUnreadyServerFailureDelegate, FMultiplayErrorResponse, ErrorResponse)
Return Type

FMultiplayErrorResponse.

FPayloadAllocationSuccessDelegate

Declaration
DECLARE_DYNAMIC_DELEGATE_OneParam(FPayloadAllocationSuccessDelegate, FString, Payload)
Return Type

FString.

FPayloadAllocationFailureDelegate

Declaration
DECLARE_DYNAMIC_DELEGATE_OneParam(FPayloadAllocationFailureDelegate, FMultiplayPayloadAllocationErrorResponse, ErrorResponse)
Return Type

FMultiplayPayloadAllocationErrorResponse.

FPayloadTokenSuccessDelegate

Declaration
DECLARE_DYNAMIC_DELEGATE_OneParam(FPayloadTokenSuccessDelegate, FMultiplayPayloadTokenResponse, TokenResponse)
Return Type

FMultiplayPayloadTokenResponse.

FPayloadTokenFailureDelegate

Declaration
DECLARE_DYNAMIC_DELEGATE_OneParam(FPayloadTokenFailureDelegate, FMultiplayPayloadTokenResponse, ErrorResponse)
Return Type

FMultiplayPayloadTokenResponse.

Constructors

UMultiplayGameServerSubsystem()

Default constructor for the Authentication subsystem.

Declaration
UMultiplayGameServerSubsystem()

UMultiplayGameServerSubsystem(FVTableHelper&)

Override constructor for forward declaration.

Declaration
UMultiplayGameServerSubsystem(FVTableHelper& Helper)
Parameters
NameDescription
HelperHelper class to invoke specialized hot-reload constructor.

Destructors

~UMultiplayGameServerSubsystem()

Default destructor for the Authentication subsystem.

Declaration
virtual ~UMultiplayGameServerSubsystem()

Overrides

Initialize(FSubsystemCollectionBase&)

Initialize overrides from USubsystem.

Declaration
virtual void Initialize(FSubsystemCollectionBase& Collection) override

Deinitialize()

Initialize overrides from USubsystem.

Declaration
virtual void Deinitialize() override

Fields

OnAllocate

Delegate that is invoked when this server has been allocated.

Declaration
UPROPERTY(BlueprintAssignable, Category="Multiplay | GameServer")
FAllocateDelegate OnAllocate
Blueprint
NameType
On AllocateFAllocateDelegate
C++
NameType
OnAllocateFAllocateDelegate

OnDeallocate

Delegate that is invoked when this server has been deallocated.

Declaration
UPROPERTY(BlueprintAssignable, Category="Multiplay | GameServer")
FDeallocateDelegate OnDeallocate
Blueprint
NameType
On DeallocateFDeallocateDelegate
C++
NameType
OnDeallocateFDeallocateDelegate

Methods

ReadyServerForPlayers(FReadyServerSuccessDelegate, FReadyServerFailureDelegate)

Marks the server as ready for players. The client invokes this method when it is ready to start accepting connections.

Declaration
UFUNCTION(BlueprintCallable, Category="Multiplay | GameServer")
void ReadyServerForPlayers(FReadyServerSuccessDelegate OnSuccess, FReadyServerFailureDelegate OnFailure)
Parameters
NameTypeDescription
OnSuccessFReadyServerSuccessDelegateThis delegate is invoked if the operation completes successfully.
OnFailureFReadyServerFailureDelegateThis delegate is invoked if the operation is unsuccessful.

UnreadyServer(FUnreadyServerSuccessDelegate, FUnreadyServerFailureDelegate)

Marks the server as not ready for players. The client invokes this method when wants to stop accepting connections.

Declaration
UFUNCTION(BlueprintCallable, Category="Multiplay | GameServer")
void UnreadyServer(FUnreadyServerSuccessDelegate OnSuccess, FUnreadyServerFailureDelegate OnFailure)
Parameters
NameTypeDescription
OnSuccessFUnreadyServerSuccessDelegateThis delegate is invoked if the operation completes successfully.
OnFailureFUnreadyServerFailureDelegateThis delegate is invoked if the operation is unsuccessful.

SubscribeToServerEvents()

Establishes a connection to the Multiplay SDK daemon and subscribes to allocation messages.

Declaration
UFUNCTION(BlueprintCallable, Category="Multiplay | GameServer")
void SubscribeToServerEvents()

UnsubscribeToServerEvents()

Cleans up connection to the Multiplay SDK daemon and unsubscribe from allocation messages.

Declaration
UFUNCTION(BlueprintCallable, Category="Multiplay | GameServer")
void UnsubscribeToServerEvents()

GetPayloadAllocation(FPayloadAllocationSuccessDelegate, FPayloadAllocationFailureDelegate)

Retrieves the allocation payload.

Declaration
UFUNCTION(BlueprintCallable, Category="Multiplay | GameServer")
void GetPayloadAllocation(FPayloadAllocationSuccessDelegate OnSuccess, FPayloadAllocationFailureDelegate OnFailure)
Parameters
NameTypeDescription
OnSuccessFPayloadAllocationSuccessDelegateThis delegate is invoked if the operation completes successfully.
OnFailureFPayloadAllocationFailureDelegateThis delegate is invoked if the operation is unsuccessful.

GetPayloadToken(FPayloadTokenSuccessDelegate, FPayloadTokenFailureDelegate)

Retrieves a JWT token for payloads.

Declaration
UFUNCTION(BlueprintCallable, Category="Multiplay | GameServer")
void GetPayloadToken(FPayloadTokenSuccessDelegate OnSuccess, FPayloadTokenFailureDelegate OnFailure)
Parameters
NameTypeDescription
OnSuccessFPayloadAllocationSuccessDelegateThis delegate is invoked if the operation completes successfully.
OnFailureFPayloadAllocationFailureDelegateThis delegate is invoked if the operation is unsuccessful.