AOnlineBeaconHost

Main actor that listens for side channel communication from another Unreal Engine application

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

OnlineSubsystemUtils

Header

/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Public/OnlineBeaconHost.h

Include

#include "OnlineBeaconHost.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(Transient, NotPlaceable, Config=Engine)
class AOnlineBeaconHost : public AOnlineBeacon

Remarks

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

Variables

Name Description

Public variable UProperty Config

int32

 

ListenPort

Configured listen port for this beacon host

Constructors

Name Description

Public function

AOnlineBeaconHost

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

DisconnectClient

(
    AOnlineBeaconClient* ClientAct...
)

Disconnect a given client from the host

Public function Virtual

AOnlineBeaco...

 

GetClientActor

(
    UNetConnection* Connection
)

Get a client beacon actor for a given connection

Public function

AOnlineBeaco...

 

GetHost

(
    const FString& BeaconType
)

Get the host responsible for a given beacon type

Public function Virtual

int32

 

GetListenPort()

Get the listen port for this beacon

Public function Virtual

bool

 

InitHost()

Initialize the host beacon on a specified port Creates the net driver and begins listening for connections

Public function Virtual

void

 

RegisterHost

(
    AOnlineBeaconHostObject* NewHo...
)

Register a beacon host and its client actor factory

Public function Virtual

void

 

RemoveClientActor

(
    AOnlineBeaconClient* ClientAct...
)

Remove a client beacon actor from the list of active connections

Public function Virtual

void

 

UnregisterHost

(
    const FString& BeaconType
)

Unregister a beacon host, making future connections of a given type unresponsive

Overridden from AOnlineBeacon

Name Description

Public function Virtual

void

 

HandleNetworkFailure

(
    UWorld* World,
    UNetDriver* NetDriver,
    ENetworkFailure::Type FailureType,
    const FString& ErrorString
)

Notification of network error messages, allows a beacon to handle the failure

Overridden from AActor

Name Description

Public function Virtual

void

 

OnNetCleanup

(
    UNetConnection* Connection
)

Handles cleaning up the associated Actor when killing the connection

Overridden from FNetworkNotify

Name Description

Public function Virtual

void

 

NotifyControlMessage

(
    UNetConnection* Connection,
    uint8 MessageType,
    FInBunch& Bunch
)

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::Receive())

Typedefs

Name

Description

FOnBeaconConnected

Delegate to route a connection event to the appropriate beacon host, by type

FOnBeaconSpawned

Delegate to route a connection attempt to the appropriate beacon host, by type

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss