FLocalAccessPointConfiguration
Local Access Point 配置。
C++
USTRUCT(BlueprintType)
struct FLocalAccessPointConfiguration
{
GENERATED_BODY()
public:
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAccessPointConfiguration")
TArray<FString> ipList;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAccessPointConfiguration")
int ipListSize = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAccessPointConfiguration")
TArray<FString> domainList;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAccessPointConfiguration")
int domainListSize = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAccessPointConfiguration")
FString verifyDomainName = "";
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAccessPointConfiguration")
ELOCAL_PROXY_MODE mode = ELOCAL_PROXY_MODE::ConnectivityFirst;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAccessPointConfiguration")
FAdvancedConfigInfo advancedConfig;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LocalAccessPointConfiguration")
bool disableAut = false;
FLocalAccessPointConfiguration(){}
FLocalAccessPointConfiguration(const agora::rtc::LocalAccessPointConfiguration & AgoraData){
for(int i = 0; i< AgoraData.ipListSize; i++){
ipList.Add(UTF8_TO_TCHAR(AgoraData.ipList[i]));
}
ipListSize = AgoraData.ipListSize;
for (int i = 0; i < AgoraData.domainListSize; i++) {
domainList.Add(UTF8_TO_TCHAR(AgoraData.domainList[i]));
}
domainListSize = AgoraData.domainListSize;
verifyDomainName = UTF8_TO_TCHAR(AgoraData.verifyDomainName);
mode = static_cast<ELOCAL_PROXY_MODE>(AgoraData.mode);
advancedConfig = FAdvancedConfigInfo(AgoraData.advancedConfig);
disableAut = AgoraData.disableAut;
}
agora::rtc::LocalAccessPointConfiguration CreateAgoraData() const {
agora::rtc::LocalAccessPointConfiguration AgoraData;
SET_UABT_TARRARY_FSTRING_TO_CONST_AGORA_ARRAY___MEMALLOC(AgoraData.ipList, ipListSize, this->ipList)
AgoraData.ipListSize = ipListSize;
SET_UABT_TARRARY_FSTRING_TO_CONST_AGORA_ARRAY___MEMALLOC(AgoraData.domainList, domainListSize, this->domainList)
AgoraData.domainListSize = domainListSize;
SET_UABT_FSTRING_TO_CONST_CHAR___MEMALLOC(AgoraData.verifyDomainName, this->verifyDomainName)
AgoraData.mode = static_cast<agora::rtc::LOCAL_PROXY_MODE>(mode);
AgoraData.advancedConfig = advancedConfig.CreateAgoraData();
AgoraData.disableAut = disableAut;
return AgoraData;
}
void FreeAgoraData(agora::rtc::LocalAccessPointConfiguration & AgoraData) const {
SET_UABT_TARRARY_FSTRING_TO_AGORA_ARRAY___MEMFREE(AgoraData.ipList, ipListSize)
SET_UABT_TARRARY_FSTRING_TO_AGORA_ARRAY___MEMFREE(AgoraData.domainList, domainListSize)
SET_UABT_FSTRING_TO_CONST_CHAR___MEMFREE(AgoraData.verifyDomainName)
advancedConfig.FreeAgoraData(AgoraData.advancedConfig);
}
};
ipList
Local Access Point 的对内 IP 地址列表。ipList 和 domainList 必须至少填一个。
ipListSize
Local Access Point 对内 IP 地址的数量。该参数的值必须和你填入的 IP 地址的数量一致。
domainList
Local Access Point 的域名列表。SDK 会根据你填入的域名解析出 Local Access Point 的 IP 地址。域名解析的超时时间为 10 秒。ipList 和 domainList 必须至少填一个。如果你同时指定 IP 地址和域名,SDK 会将根据域名解析出来的 IP 地址和你指定的 IP 地址合并、去重,然后随机连接一个 IP 来实现负载均衡。
domainListSize
Local Access Point 域名的数量。该参数的值必须和你填入的域名的数量一致。
verifyDomainName
内网证书验证域名。如果传值为空,则用 SDK 默认的证书验证域名
secure-edge.local
。mode
连接模式。详见 ELOCAL_PROXY_MODE。
advancedConfig
Local Access Point 的高级选项。详见 FAdvancedConfigInfo。