harmony 鸿蒙@ohos.net.sharing (Network Sharing)

  • 2025-06-12
  • 浏览 (6)

@ohos.net.sharing (Network Sharing)

The network sharing module allows you to share your device’s network connectivity with other connected devices.

NOTE

The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.

Modules to Import

import { sharing } from '@kit.NetworkKit';

NetHandle

type NetHandle = connection.NetHandle

Defines the handle of the data network. Before calling the NetHandle function, call the getNetHandle function to obtain a NetHandle object.

System capability: SystemCapability.Communication.NetManager.Core

Type Description
connection.NetHandle Network link address information.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Network Kit

harmony 鸿蒙NetConn_ConnectionProperties

harmony 鸿蒙NetConn_HttpProxy

harmony 鸿蒙NetConn_NetAddr

harmony 鸿蒙NetConn_NetCapabilities

harmony 鸿蒙NetConn_NetConnCallback

harmony 鸿蒙NetConn_NetHandle

harmony 鸿蒙NetConn_NetHandleList

harmony 鸿蒙NetConn_NetSpecifier

harmony 鸿蒙NetConn_Route

0  赞