Navigation
API > API/Plugins > API/Plugins/OnlineSubsystemUtils
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- AActor
- AOnlineBeacon
- AOnlineBeaconClient
- ALobbyBeaconClient
- APartyBeaconClient
- AQosBeaconClient
- ASpectatorBeaconClient
- ATestBeaconClient
References
| Module | OnlineSubsystemUtils |
| Header | /Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Public/OnlineBeaconClient.h |
| Include | #include "OnlineBeaconClient.h" |
Syntax
UCLASS&40;Transient, NotPlaceable, Config&61;Engine&41;
class AOnlineBeaconClient : public AOnlineBeacon
Remarks
Base class for any unique beacon connectivity, paired with an AOnlineBeaconHostObject implementation
This is the actual actor that replicates across client/server and where all RPCs occur On the host, the life cycle is managed by an AOnlineBeaconHostObject On the client, the life cycle is managed by the game
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UNetConnection > | BeaconConnection | Network connection associated with this beacon client instance | |
| TObjectPtr< AOnlineBeaconHostObject > | BeaconOwner | Owning beacon host of this beacon actor (server only) | |
| EBeaconConnectionState | ConnectionState | State of the connection | |
| FOnHostConnectionFailure | HostConnectionFailure | Delegate for host beacon connection failures | |
| FTimerHandle | TimerHandle_OnFailure | Handle for efficient management of OnFailure timer |
Constructors
| Type | Name | Description | |
|---|---|---|---|
AOnlineBeaconClient
(
const FObjectInitializer& ObjectInitializer |
For backwards compatibility with newer engine encryption API |
Functions
| Type | Name | Description | |
|---|---|---|---|
| AOnlineBeaconHostObject * | Get the owner of this beacon actor, some host that is listening for connections (server side only, clients have no access) | ||
| FString | Each beacon must have a unique type identifier | ||
| EBeaconConnectionState | Get the connection state Higher level than the net connection because of the handshaking of the actors | ||
| FString | GetLoginOptions
(
const FUniqueNetIdRepl& PlayerId |
Get the login options to send the server during login. | |
| const FUniqueNetIdRepl & | GetUniqueId () |
Get the unique id of the user on this connection (server side only) | |
| bool | InitClient
(
FURL& URL |
Initialize the client beacon with connection endpoint Creates the net driver and attempts to connect with the destination | |
| void | OnConnected () |
A connection has been made and RPC/replication can begin | |
| FOnHostConnectionFailure & | Delegate triggered on failures to connect to a host beacon | ||
| void | Send the packet for triggering the initial join | ||
| void | SetBeaconOwner
(
AOnlineBeaconHostObject* InBeaconOwner |
Set the owner of this beacon actor, some host that is listening for connections (server side only, clients have no access) | |
| void | SetConnectionState
(
EBeaconConnectionState NewConnectionState |
Set the connection state Higher level than the net connection because of the handshaking of the actors | |
| void | SetEncryptionData
(
const FEncryptionData& InEncryptionData |
Sets the encryption data that will be used for server connections. | |
| void | SetNetConnection
(
UNetConnection* NetConnection |
Associate this beacon with a network connection |
Overridden from AOnlineBeacon
| Type | Name | Description | |
|---|---|---|---|
| void | Beacon cleanup and net driver destruction | ||
| void | OnFailure () |
Notification that failure needs to be handled |
Overridden from AActor
| Type | Name | Description | |
|---|---|---|---|
| bool | Called by DestroyActor(), gives actors a chance to op out of actor destruction Used by network code to have the net connection timeout/cleanup first | ||
| UNetConnection * | Get the owning connection used for communicating between client/server | ||
| const AActor * | GetNetOwner () |
Return the actor responsible for replication, if any. Typically the player controller | |
| void | OnNetCleanup
(
UNetConnection* Connection |
Handles cleaning up the associated Actor when killing the connection | |
| void | Tick
(
float DeltaSeconds |
Function called every frame on this Actor. | |
| bool | Used by the net connection to determine if a net owning actor should switch to using the shortened timeout value |
Overridden from FNetworkNotify
| Type | Name | Description | |
|---|---|---|---|
| void | NotifyControlMessage
(
UNetConnection* Connection, |
Handler for messages sent through a remote connection's control channel not required to handle the message, but if it reads any data from Bunch, it MUST read the ENTIRE data stream for that message (i.e. use FNetControlMessage |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| FString | GetAuthTicket
(
const FUniqueNetIdRepl& PlayerId |
GetAuthTicket is deprecated. Override the login options by overriding GetLoginOptions and specifying AuthTicket=s with the resulting string |