Updated on 2024-07-30 GMT+08:00

Setting the Network Mode

Function

This API is used to set the network mode. 1. This API needs to be called only when an application in an enterprise cannot directly access the public network (that is, when the media nodes and management nodes are deployed in the enterprise). If the media nodes of Huawei Cloud Meeting are deployed in the enterprise and management nodes are accessed through the proxy of the enterprise, set the network mode to enterprise intranet access. 2. This API is optional. If it is not called, the default mode is used.

Function Prototype

setNetworkMode(networkInfo: NetWorkModeInfo, onSetNetworkModeResult?: (ret: SDKERR, reason: string) => void): voidsetNetworkMode(networkInfo: NetWorkModeInfo, onSetNetworkModeResult?: (ret: SDKERR, reason: string) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
networkInfo Yes NetWorkModeInfo Network mode information.
onSetNetworkModeResult Yes (ret: SDKERR, reason: string) => void Callback of setting the network mode.
Table 2 NetWorkModeInfo
Parameter Mandatory Type Description
accessType Yes NetworkAccessType Network access type.
netConnectType No NetConnectType Network connection type (valid only for the Windows client).
Table 3 Enumerated values of NetworkAccessType
Enumeration Name Enumerated Value Description
ACCESS_TYPE_AUTO 0 Default value. Currently, the value is the same as the extranet access mode.
ACCESS_TYPE_INNER 1 Intranet access, which is used when the media and signaling nodes are deployed in the enterprise. The app uses the intranet for access. Signaling and media messages access the Huawei Cloud Meeting server through the proxy server.
ACCESS_TYPE_OUTER 2 External network access, which is used when the media and signaling nodes are not deployed in the enterprise. The app uses the Internet for access. Signaling and media messages can directly access the Huawei Cloud Meeting server.
Table 4 Enumerated values of NetConnectType
Enumeration Name Enumerated Value Description
NET_CONNECT_AUTO 0 Auto mode.
NET_CONNECT_FORCE_VPN 1 Forcible VPN.
NET_CONNECT_FORCE_DIRECT 2 Forcible direct connection.

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string) => void

Table 5 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.