Loading...
Searching...
No Matches
AccelByte::Api::TurnManager Class Reference

TurnManager API to manage Qos Server(s). More...

#include <AccelByteTurnManagerApi.h>

Inheritance diagram for AccelByte::Api::TurnManager:

Public Member Functions

 TurnManager (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient=nullptr)
 TurnManager (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
FAccelByteTaskWPtr GetTurnServers (const THandler< FAccelByteModelsTurnServerList > &OnSuccess, FErrorHandler const &OnError)
 Get List of TURN Server(s).
FAccelByteTaskWPtr GetTurnServersV2 (const THandler< FAccelByteModelsTurnServerList > &OnSuccess, FErrorHandler const &OnError)
 Get List of TURN Server(s).
FAccelByteTaskWPtr GetClosestTurnServer (THandler< FAccelByteModelsTurnServer > const &OnSuccess, FErrorHandler const &OnError)
 Get closest TURN server(s).
FAccelByteTaskWPtr GetClosestTurnServerV2 (THandler< FAccelByteModelsTurnServer > const &OnSuccess, FErrorHandler const &OnError)
 Get closest TURN server(s).
FAccelByteTaskWPtr GetTurnServerLatencyByRegion (const FString &Region, THandler< int32 > const &OnSuccess, FErrorHandler const &OnError)
 Get turn server metrics by specific region.
FAccelByteTaskWPtr GetTurnCredential (FString const &Region, FString const &Ip, int Port, THandler< FAccelByteModelsTurnServerCredential > const &OnSuccess, FErrorHandler const &OnError)
 Get credential to authenticate with the turn server.
FAccelByteTaskWPtr SendMetric (FString const &SelectedTurnServerRegion, EP2PConnectionType P2PConnectionType, FVoidHandler const &OnSuccess, FErrorHandler const &OnError, int32 Latency=INDEX_NONE)
 Send info about P2P connection type and selected turn server region to BE. This called by client.
void GetTurnServerLatencies (const THandler< TArray< TPair< FString, float > > > &OnPingRegionsSuccess, const FErrorHandler &OnError)
 Sets QosServers, using this cache for future calls.
Public Member Functions inherited from AccelByte::FApiBase
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
void SetApiClient (TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)

Static Public Member Functions

static const TArray< TPair< FString, float > > & GetCachedLatencies ()
 Get cached latencies data.

Additional Inherited Members

Protected Member Functions inherited from AccelByte::FApiBase
template<typename T>
bool ValidateAccelByteId (FString const &Id, EAccelByteIdHypensRule HypenRule, FString const &ErrorMessage, T const &OnError)
Protected Attributes inherited from AccelByte::FApiBase
TSharedRef< Credentials const, ESPMode::ThreadSafe > CredentialsRef
Settings const & SettingsRef
FHttpRetrySchedulerBaseHttpRef
FHttpClient HttpClient
FAccelBytePlatformPtr AccelBytePlatformPtr

Detailed Description

TurnManager API to manage Qos Server(s).

Member Function Documentation

◆ GetClosestTurnServer()

FAccelByteTaskWPtr AccelByte::Api::TurnManager::GetClosestTurnServer ( THandler< FAccelByteModelsTurnServer > const & OnSuccess,
FErrorHandler const & OnError )

Get closest TURN server(s).

Parameters
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsTurnServer.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetClosestTurnServerV2()

FAccelByteTaskWPtr AccelByte::Api::TurnManager::GetClosestTurnServerV2 ( THandler< FAccelByteModelsTurnServer > const & OnSuccess,
FErrorHandler const & OnError )

Get closest TURN server(s).

Parameters
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsTurnServer.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetTurnCredential()

FAccelByteTaskWPtr AccelByte::Api::TurnManager::GetTurnCredential ( FString const & Region,
FString const & Ip,
int Port,
THandler< FAccelByteModelsTurnServerCredential > const & OnSuccess,
FErrorHandler const & OnError )

Get credential to authenticate with the turn server.

Parameters
Region
Ip
Port
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsTurnServerCredential.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetTurnServerLatencies()

void AccelByte::Api::TurnManager::GetTurnServerLatencies ( const THandler< TArray< TPair< FString, float > > > & OnPingRegionsSuccess,
const FErrorHandler & OnError )

Sets QosServers, using this cache for future calls.

Parameters
OnPingRegionsSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.

◆ GetTurnServerLatencyByRegion()

FAccelByteTaskWPtr AccelByte::Api::TurnManager::GetTurnServerLatencyByRegion ( const FString & Region,
THandler< int32 > const & OnSuccess,
FErrorHandler const & OnError )

Get turn server metrics by specific region.

Parameters
RegionSpecified region to get the server metrics
OnSuccessThis will be called when the operation succeeded. The result is the latency of specified region.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetTurnServers()

FAccelByteTaskWPtr AccelByte::Api::TurnManager::GetTurnServers ( const THandler< FAccelByteModelsTurnServerList > & OnSuccess,
FErrorHandler const & OnError )

Get List of TURN Server(s).

Parameters
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsTurnServerList.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetTurnServersV2()

FAccelByteTaskWPtr AccelByte::Api::TurnManager::GetTurnServersV2 ( const THandler< FAccelByteModelsTurnServerList > & OnSuccess,
FErrorHandler const & OnError )

Get List of TURN Server(s).

Parameters
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsTurnServerList.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ SendMetric()

FAccelByteTaskWPtr AccelByte::Api::TurnManager::SendMetric ( FString const & SelectedTurnServerRegion,
EP2PConnectionType P2PConnectionType,
FVoidHandler const & OnSuccess,
FErrorHandler const & OnError,
int32 Latency = INDEX_NONE )

Send info about P2P connection type and selected turn server region to BE. This called by client.

Parameters
SelectedTurnServerRegionSelected turn server region
P2PConnectionTypeP2P connection type enum (host, relay, srflx, or prflx)
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
LatencyIt will send to turn server metrics if specified
Returns
AccelByteTask object to track and cancel the ongoing API operation.