ConnectivityManager.GetConnectionOwnerUid 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳網路連線擁有者的資訊 uid 。
[Android.Runtime.Register("getConnectionOwnerUid", "(ILjava/net/InetSocketAddress;Ljava/net/InetSocketAddress;)I", "GetGetConnectionOwnerUid_ILjava_net_InetSocketAddress_Ljava_net_InetSocketAddress_Handler", ApiSince=29)]
public virtual int GetConnectionOwnerUid(int protocol, Java.Net.InetSocketAddress local, Java.Net.InetSocketAddress remote);
[<Android.Runtime.Register("getConnectionOwnerUid", "(ILjava/net/InetSocketAddress;Ljava/net/InetSocketAddress;)I", "GetGetConnectionOwnerUid_ILjava_net_InetSocketAddress_Ljava_net_InetSocketAddress_Handler", ApiSince=29)>]
abstract member GetConnectionOwnerUid : int * Java.Net.InetSocketAddress * Java.Net.InetSocketAddress -> int
override this.GetConnectionOwnerUid : int * Java.Net.InetSocketAddress * Java.Net.InetSocketAddress -> int
參數
- protocol
- Int32
連線的協議。 目前僅IPPROTO_TCPIPPROTO_UDP支援。
- local
- InetSocketAddress
連結的在地 InetSocketAddress 。
- remote
- InetSocketAddress
連線的遙控 InetSocketAddress 。
傳回
uid 如果連線被找到且應用程式有權限觀察(例如,該連線與呼叫的 VPN 應用程式的 VpnService 隧道相關聯),或 android.os.Process#INVALID_UID 是找不到連線。
- 屬性
備註
回傳網路連線擁有者的資訊 uid 。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。