Navigation
API > API/Plugins > API/Plugins/OnlineSubsystemUtils
Main actor that listens for side channel communication from another Unreal Engine application
The AOnlineBeaconHost listens for connections to route to a registered AOnlineBeaconHostObject The AOnlineBeaconHostObject is responsible for spawning the server version of the AOnlineBeaconClient The AOnlineBeaconHost pairs the two client actors, verifies the validity of the exchange, and accepts/continues the connection
| Name | AOnlineBeaconHost |
| Type | class |
| Header File | /Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Public/OnlineBeaconHost.h |
| Include Path | #include "OnlineBeaconHost.h" |
Syntax
UCLASS (MinimalAPI, Transient, NotPlaceable, Config=Engine)
class AOnlineBeaconHost : public AOnlineBeacon
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → AOnlineBeacon → AOnlineBeaconHost
- FNetworkNotify → AOnlineBeacon → AOnlineBeaconHost
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
AOnlineBeaconHost
(
const FObjectInitializer& ObjectInitializer |
OnlineBeaconHost.h |
Structs
| Name | Remarks |
|---|---|
| FConnectionState | Connection states used to check against misbehaving connections. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FNetCloseResult | UE::Net::FNetCloseResult | OnlineBeaconHost.h | |
| FOnAuthenticationVerificationCompleteDelegate | TBaseDelegate_OneParam< void, const FOnlineError & > | Delegate executed when user authentication has completed. | OnlineBeaconHost.h |
| FOnBeaconConnected | TBaseDelegate_TwoParams< void, AOnlineBeaconClient *, UNetConnection * > | Delegate to route a connection event to the appropriate beacon host, by type | OnlineBeaconHost.h |
| FOnBeaconSpawned | TBaseDelegate_OneParam< AOnlineBeaconClient *, UNetConnection * > | Delegate to route a connection attempt to the appropriate beacon host, by type | OnlineBeaconHost.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bReuseAddressAndPort | bool | Whether to configure the listening socket to allow reuse of the address and port. | OnlineBeaconHost.h |
|
| ListenPort | int32 | Configured listen port for this beacon host | OnlineBeaconHost.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ClientActors | TArray< TObjectPtr< AOnlineBeaconClient > > | List of all client beacon actors with active connections | OnlineBeaconHost.h | |
| ConnectionState | TMap< UNetConnection *, FConnectionState > | OnlineBeaconHost.h | ||
| OnBeaconConnectedMapping | TMap< FString, FOnBeaconConnected > | Mapping of beacon types to the OnBeaconConnected delegates | OnlineBeaconHost.h | |
| OnBeaconSpawnedMapping | TMap< FString, FOnBeaconSpawned > | Mapping of beacon types to the OnBeaconSpawned delegates | OnlineBeaconHost.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DisconnectClient
(
AOnlineBeaconClient* ClientActor |
Disconnect a given client from the host | OnlineBeaconHost.h | |
virtual AOnlineBeaconClient * GetClientActor
(
UNetConnection* Connection |
Get a client beacon actor for a given connection | OnlineBeaconHost.h | |
AOnlineBeaconHostObject * GetHost
(
const FString& BeaconType |
Get the host responsible for a given beacon type | OnlineBeaconHost.h | |
virtual int32 GetListenPort() |
Get the listen port for this beacon | OnlineBeaconHost.h | |
virtual bool InitHost() |
Initialize the host beacon on a specified port Creates the net driver and begins listening for connections | OnlineBeaconHost.h | |
virtual void RegisterHost
(
AOnlineBeaconHostObject* NewHostObject |
Register a beacon host and its client actor factory | OnlineBeaconHost.h | |
virtual void RemoveClientActor
(
AOnlineBeaconClient* ClientActor |
Remove a client beacon actor from the list of active connections | OnlineBeaconHost.h | |
virtual void UnregisterHost
(
const FString& BeaconType |
Unregister a beacon host, making future connections of a given type unresponsive | OnlineBeaconHost.h |
Overridden from AOnlineBeacon
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void HandleNetworkFailure
(
UWorld* World, |
Notification of network error messages, allows a beacon to handle the failure | OnlineBeaconHost.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnNetCleanup
(
UNetConnection* Connection |
OnlineBeaconHost.h |
Overridden from FNetworkNotify
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void NotifyControlMessage
(
UNetConnection* Connection, |
OnlineBeaconHost.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FString GetDebugName
(
UNetConnection* Connection |
OnlineBeaconHost.h | ||
virtual bool StartVerifyAuthentication
(
const FUniqueNetId& PlayerId, |
Start verifying an authentication token for a connection. | OnlineBeaconHost.h | |
virtual bool VerifyJoinForBeaconType
(
const FUniqueNetId& PlayerId, |
Verify user authentication once the beacon type is known. | OnlineBeaconHost.h |