Nelaric Unreal Gameplay
Gameplay framework API
Toggle main menu visibility
Loading...
Searching...
No Matches
TransitionBeaconClient.h
Go to the documentation of this file.
1
// Copyright (c) 2026 Nelaric
2
6
7
#pragma once
8
9
#include "CoreTypes.h"
10
#include "
Core/NetWork/NetworkEndpoint.h
"
11
#include "Delegates/Delegate.h"
12
#include "OnlineBeaconClient.h"
13
14
#include "TransitionBeaconClient.generated.h"
15
21
DECLARE_MULTICAST_DELEGATE_ThreeParams
(FTargetDecision, uint64,
bool
,
bool
);
22
29
UCLASS(MinimalAPI, Transient, NotPlaceable)
30
class
ATransitionBeaconClient
: public AOnlineBeaconClient
31
{
32
GENERATED_BODY()
33
34
public
:
43
GAMEPLAYRUNTIME_API
bool
BeginTargetApproval
(
const
Nelaric::FNetworkEndpoint
& Endpoint, uint64 RequestId);
44
53
GAMEPLAYRUNTIME_API FTargetDecision&
OnTargetDecision
();
54
55
public
:
60
GAMEPLAYRUNTIME_API
virtual
void
OnConnected
()
override
;
61
66
GAMEPLAYRUNTIME_API
virtual
void
OnFailure
()
override
;
67
68
// Native subclasses in other modules need these virtual definitions.
69
GAMEPLAYRUNTIME_API
virtual
void
ServerRequestTargetApproval_Implementation(uint64 RequestId);
70
GAMEPLAYRUNTIME_API
virtual
void
ClientReceiveTargetDecision_Implementation(uint64 RequestId,
bool
bApproved);
71
72
private
:
73
UFUNCTION(Server, Reliable)
74
void
ServerRequestTargetApproval(uint64 RequestId);
75
76
UFUNCTION(Client, Reliable)
77
void
ClientReceiveTargetDecision(uint64 RequestId,
bool
bApproved);
78
79
uint64 PendingRequestId = 0;
80
bool
bDecisionDelivered =
false
;
81
FTargetDecision TargetDecision;
82
};
DECLARE_MULTICAST_DELEGATE_ThreeParams
DECLARE_MULTICAST_DELEGATE_ThreeParams(FDepartureDecision, uint64, const FString &, bool)
Reports the current server's departure decision on the game thread.
NetworkEndpoint.h
ATransitionBeaconClient
Contacts a destination server before game travel.
Definition
TransitionBeaconClient.h:31
ATransitionBeaconClient::OnTargetDecision
GAMEPLAYRUNTIME_API FTargetDecision & OnTargetDecision()
Observes the destination server's decision or failure.
ATransitionBeaconClient::OnConnected
virtual GAMEPLAYRUNTIME_API void OnConnected() override
Sends the approval request after beacon connection.
ATransitionBeaconClient::OnFailure
virtual GAMEPLAYRUNTIME_API void OnFailure() override
Reports a failed beacon connection.
ATransitionBeaconClient::BeginTargetApproval
GAMEPLAYRUNTIME_API bool BeginTargetApproval(const Nelaric::FNetworkEndpoint &Endpoint, uint64 RequestId)
Connects to a target's beacon and requests admission.
Nelaric::FNetworkEndpoint
Host address and transport port of one network endpoint.
Definition
NetworkEndpoint.h:20
NelaricGameplay
Plugins
NelaricGameplay
Source
GameplayRuntime
Public
Session
TransitionBeaconClient.h
Generated by
1.18.0