harmony 鸿蒙Network Management Overview

  • 2022-08-09
  • 浏览 (659)

Network Management Overview

Network management functions include:

  • HTTP data request: Initiates a data request through HTTP.
  • WebSocket connection: Establishes a bidirectional connection between the server and client through WebSocket.
  • Socket connection: Transmits data through Socket.
  • Network sharing: Shares a device’s Internet connection with other connected devices by means of Wi-Fi hotspot, Bluetooth, and USB sharing, and queries the network sharing state and shared mobile data volume.
  • Ethernet connection: Provides wired network capabilities, which allow you to set the IP address, subnet mask, gateway, and Domain Name System (DNS) server of a wired network.
  • Network connection management: Provides basic network management capabilities, including management of Wi-Fi/cellular/Ethernet connection priorities, network quality evaluation, subscription to network connection status changes, query of network connection information, and DNS resolution.
  • mDNS management: provides Multicast DNS (mDNS) management capabilities, such as adding, removing, discovering, and resolving local services on a LAN.

Constraints

To use the functions of the network management module, you must obtain the permissions listed in the following table.

Permission Description
ohos.permission.GET_NETWORK_INFO Allows an application to obtain the network connection information.
ohos.permission.SET_NETWORK_INFO Allows an application to modify the network connection state.
ohos.permission.INTERNET Allows an application to open network sockets to connect to the network.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Connectivity

harmony 鸿蒙HTTP Data Request

harmony 鸿蒙IPC & RPC Development Guidelines

harmony 鸿蒙IPC & RPC Overview

harmony 鸿蒙Network Connection Management

harmony 鸿蒙Ethernet Connection

harmony 鸿蒙mDNS Management

harmony 鸿蒙Network Sharing

harmony 鸿蒙Traffic Management

harmony 鸿蒙VPN Management

0  赞