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
FDeallocateDelegate
Declaration
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDeallocateDelegate, FMultiplayDeallocation, Deallocation)
Return Type
FReadyServerSuccessDelegate
Declaration
DECLARE_DYNAMIC_DELEGATE(FReadyServerSuccessDelegate)
FReadyServerFailureDelegate
Declaration
DECLARE_DYNAMIC_DELEGATE_OneParam(FReadyServerFailureDelegate, FMultiplayErrorResponse, ErrorResponse)
Return Type
FUnreadyServerSuccessDelegate
Declaration
DECLARE_DYNAMIC_DELEGATE(FUnreadyServerSuccessDelegate)
FUnreadyServerFailureDelegate
Declaration
DECLARE_DYNAMIC_DELEGATE_OneParam(FUnreadyServerFailureDelegate, FMultiplayErrorResponse, ErrorResponse)
Return Type
FPayloadAllocationSuccessDelegate
Declaration
DECLARE_DYNAMIC_DELEGATE_OneParam(FPayloadAllocationSuccessDelegate, FString, Payload)
Return Type
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
Name | Description |
---|---|
Helper | Helper 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
Name | Type |
---|---|
On Allocate | FAllocateDelegate |
C++
Name | Type |
---|---|
OnAllocate | FAllocateDelegate |
OnDeallocate
Delegate that is invoked when this server has been deallocated.
Declaration
UPROPERTY(BlueprintAssignable, Category="Multiplay | GameServer")
FDeallocateDelegate OnDeallocate
Blueprint
Name | Type |
---|---|
On Deallocate | FDeallocateDelegate |
C++
Name | Type |
---|---|
OnDeallocate | FDeallocateDelegate |
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
Name | Type | Description |
---|---|---|
OnSuccess | FReadyServerSuccessDelegate | This delegate is invoked if the operation completes successfully. |
OnFailure | FReadyServerFailureDelegate | This 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
Name | Type | Description |
---|---|---|
OnSuccess | FUnreadyServerSuccessDelegate | This delegate is invoked if the operation completes successfully. |
OnFailure | FUnreadyServerFailureDelegate | This 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
Name | Type | Description |
---|---|---|
OnSuccess | FPayloadAllocationSuccessDelegate | This delegate is invoked if the operation completes successfully. |
OnFailure | FPayloadAllocationFailureDelegate | This 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
Name | Type | Description |
---|---|---|
OnSuccess | FPayloadAllocationSuccessDelegate | This delegate is invoked if the operation completes successfully. |
OnFailure | FPayloadAllocationFailureDelegate | This delegate is invoked if the operation is unsuccessful. |