Lines Matching refs:network

5network management capabilities, including management of Wi-Fi/cellular/Ethernet connection priori…
8 … mode. For details about the APIs, see [API Reference](../reference/apis-network-kit/js-apis-net-c…
14 …etect the network availability to prevent the switch from an available network to an unavailable n…
15 … select the optimal network when multiple networks coexist. It is triggered when the network statu…
24 Typical application scenarios of network connection management are as follows:
26 - Subscribing to status changes of the specified network
28 - Querying network connection information based on the data network
29 - Resolving the domain name of a network to obtain all IP addresses
35 … and example code, see [Network Connection Management](../reference/apis-network-kit/js-apis-net-c…
39 …reates a **NetHandle** object that contains the **netId** of the default network. This API uses an…
40 …AsyncCallback\<HttpProxy>): void;| Obtains the global HTTP proxy for the network. This API uses an…
41 …llback: AsyncCallback\<void>): void;| Sets the global HTTP proxy for the network. This API uses an…
42 …(httpProxy: HttpProxy): void;| Sets the application-level HTTP proxy configuration of the network.|
43 …void;| Obtains a **NetHandle** object that contains the **netId** of the network bound to the appl…
44 …ds an application to the specified network. The application can access the external network only t…
45 …the default active data network in synchronous mode. You can use **getNetCapabilities** to obtain …
46 | hasDefaultNet(callback: AsyncCallback\<boolean>): void; |Checks whether the default data network
47 …le>>): void;| Obtains the list of **NetHandle** objects of the connected network. This API uses an…
48 …AsyncCallback\<ConnectionProperties>): void; |Obtains network connection information of the networ…
49 …allback\<NetCapabilities>): void; |Obtains capability information of the network corresponding to …
50 …\<boolean>): void; |Checks whether the data traffic usage on the current network is metered. This …
51 …to NetManager. If this API is called, the application considers that its network status (ohos.net.…
52 …to NetManager. If this API is called, the application considers that its network status (ohos.net.…
53 …\<Array\<NetAddress>>): void; |Obtains all IP addresses of the specified network by resolving the …
56network, and **timeout** specifies the timeout interval in ms. **timeout** is configurable only wh…
57 …k\<void>): void; | Binds a **TCPSocket** or **UDPSocket** to the current network. This API uses an…
58 …\<Array\<NetAddress>>): void; |Obtains all IP addresses of the specified network by resolving the …
59 …yncCallback\<NetAddress>): void; |Obtains an IP address of the specified network by resolving the …
66 | register(callback: AsyncCallback\<void>): void; |Subscribes to network status changes.|
67 | unregister(callback: AsyncCallback\<void>): void; |Unsubscribes from network status changes.|
76 2. Call **createNetConnection()** to create a **NetConnection** object. You can specify the network
80 4. Call **conn.register()** to subscribe to network status changes of the specified network.
82 5. When the network is available, the callback will be invoked to return the **netAvailable** event…
84 6. Call **conn.unregister()** to unsubscribe from the network status changes if required.
93 …// Assume that the default network is Wi-Fi. If you need to create a cellular network connection, …
95 // Set the network capability to INTERNET.
106 // Register an observer for network status changes.
111 // Listen to network status change events. If the network is available, an on_netAvailable event is…
116 // Listen to network status change events. If the network is unavailable, an on_netUnavailable even…
121 // Unregister the observer for network status changes.
179 3. Call **getDefaultNet** to obtain the default data network via **NetHandle** or call **getAllNets…
181network capability information of the data network specified by **NetHandle**. The capability info…
183 5. Call **getConnectionProperties** to obtain the connection information of the data network specif…
213 // Call getDefaultNet to obtain the default data network specified by **NetHandle**.
216 …// If the obtained netid of netHandler is 0 when no default network is specified, an exception has…
222network capability information of the data network specified by **NetHandle**. The capability info…
226 // Obtain the network type via bearerTypes.
231 // Cellular network
234 // Wi-Fi network
237 // Ethernet network
242 // Obtain the specific network capabilities via networkCap.
247 …// The network can connect to the carrier's Multimedia Messaging Service Center (MMSC) to send and…
250 // The network traffic is not metered.
253 // The network has the Internet access capability, which is set by the network provider.
256 // The network does not use a Virtual Private Network (VPN).
259 …// The Internet access capability of the network is successfully verified by the connection manage…
267 // Obtain the connection information of the data network specified by NetHandle. Connection informa…
281 …// Obtain the network capability information of the network specified by each netHandle on the net…
286 …// Obtain the connection information of the network specified by each netHandle on the network lis…
295 ## Resolving the domain name of a network to obtain all IP addresses
302 3. Call **getAddressesByName** to use the default network to resolve the host name to obtain the li…
309 // Use the default network to resolve the host name to obtain the list of all IP addresses.