harmony 鸿蒙@ohos.net.sharing (网络共享管理)

  • 2025-06-16
  • 浏览 (3)

@ohos.net.sharing (网络共享管理)

网络共享管理模块用于将设备网络连接共享给其他连接设备。

说明:

本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。

导入模块

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

NetHandle

type NetHandle = connection.NetHandle

数据网络的句柄。在调用NetHandle的方法之前,需要先获取NetHandle对象。

系统能力:SystemCapability.Communication.NetManager.Core

类型 说明
connection.NetHandle 网络链路信息。

你可能感兴趣的鸿蒙文章

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  赞