harmony 鸿蒙Introduction to Network Kit
Introduction to Network Kit
Network Kit provides the following functions:
- 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 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.
- 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.
Constraints
To use the functions of the network management module, you must obtain the permissions listed in the following table. Before requesting permissions, ensure that the basic principles for using permissions are met. Declare the permissions required by your application. For details, see Declaring Permissions in the Configuration File.
Permission | Description |
---|---|
ohos.permission.GET_NETWORK_INFO | Allows an application to obtain the network connection information. |
ohos.permission.INTERNET | Allows an application to open network sockets to connect to the network. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Network Connection Development
harmony 鸿蒙WebSocket Connection (C/C++)
harmony 鸿蒙Network Connection Management
harmony 鸿蒙Ethernet Connection (For System Applications Only)
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦