Navigation
API > API/Plugins > API/Plugins/OnlineSubsystemUtils
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- AActor
- AOnlineBeacon
- AOnlineBeaconClient
- ASpectatorBeaconClient
References
| Module | OnlineSubsystemUtils |
| Header | /Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Public/SpectatorBeaconClient.h |
| Include | #include "SpectatorBeaconClient.h" |
Syntax
UCLASS&40;Transient, NotPlaceable, Config&61;Engine&41;
class ASpectatorBeaconClient : public AOnlineBeaconClient
Remarks
A beacon client used for making reservations with an existing game session
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bCancelReservation | Has the reservation request been canceled | |
| bool | bPendingReservationSent | Has the reservation request been delivered | |
| FTimerHandle | CancelRPCFailsafe | Timer to trigger a cancel reservation request if the server doesn't respond in time | |
| FString | DestSessionId | Session Id of the destination host | |
| FTimerHandle | PendingCancelResponseTimerHandle | ||
| FSpectatorReservation | PendingReservation | Pending reservation that will be sent upon connection with the intended host | |
| FTimerHandle | PendingReservationFullTimerHandle | ||
| FTimerHandle | PendingReservationUpdateTimerHandle | ||
| FTimerHandle | PendingResponseTimerHandle | Timers for delaying various responses (debug) | |
| ESpectatorClientRequestType | RequestType | Type of request currently being handled by this client beacon | |
| FOnReservationCountUpdate | ReservationCountUpdate | Delegate for reservation count updates | |
| FOnReservationFull | ReservationFull | Delegate for reservation full | |
| FOnSpectatorReservationRequestComplete | ReservationRequestComplete | Delegate for reservation request responses |
Constructors
| Type | Name | Description | |
|---|---|---|---|
ASpectatorBeaconClient
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Cancel an existing request to the remote host to revoke allocated space on the server. | ||
| void | ClearTimers
(
bool bCallFailSafeIfNeeded |
Clear out all the timer handles listed above | |
| void | ClientCancelReservationResponse
(
ESpectatorReservationResult::Type ReservationResponse |
Response from the host session after making a cancellation request | |
| void | ClientReservationResponse
(
ESpectatorReservationResult::Type ReservationResponse |
Response from the host session after making a reservation request | |
| void | Response from the host session that the reservation is full | ||
| void | ClientSendReservationUpdates
(
int32 NumRemainingReservations |
Response from the host session that the reservation count has changed | |
| FTimerHandle | DelayResponse
(
FTimerDelegate& Delegate, |
Trigger the given delegate at a later time | |
| const FSpectatorReservation & | |||
| void | Delegate triggered when a cancel reservation request is complete | ||
| void | Delegate triggered if the client doesn't hear from the server in time | ||
| FOnReservationCountUpdate & | Delegate triggered when the host indicated a reservation count has changed | ||
| FOnReservationFull & | Delegate triggered when the host indicated the reservation is full | ||
| FOnSpectatorReservationRequestComplete & | Delegate triggered when a response from the spectator beacon host has been received | ||
| void | ProcessCancelReservationResponse
(
ESpectatorReservationResult::Type ReservationResponse |
Process a response to our CancelReservation request to the server | |
| void | Process a response from the server that the reservation beacon is full | ||
| void | ProcessReservationResponse
(
ESpectatorReservationResult::Type ReservationResponse |
Process a response to our RequestReservation request to the server | |
| void | ProcessReservationUpdate
(
int32 NumRemainingReservations |
Process a response from the server with an update to the number of consumed reservations | |
| bool | RequestReservation
(
const FOnlineSessionSearchResult& DesiredHost, |
Sends a request to the remote host to allow the specified members to reserve space in the host's session. | |
| bool | RequestReservation
(
const FString& ConnectInfoStr, |
Sends a request to the remote host to allow the specified members to reserve space in the host's session. | |
| void | ServerCancelReservationRequest
(
const FUniqueNetIdRepl& Spectator |
Tell the server to cancel a pending or existing reservation | |
| void | ServerReservationRequest
(
const FString& SessionId, |
Tell the server about the reservation request being made |
Overridden from AOnlineBeaconClient
| Type | Name | Description | |
|---|---|---|---|
| void | OnConnected () |
A connection has been made and RPC/replication can begin |
Overridden from AOnlineBeacon
| Type | Name | Description | |
|---|---|---|---|
| void | OnFailure () |
Notification that failure needs to be handled |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. |