GCKNetworkAddress 類別
代表網路 IP 位址的物件。
這個物件無法變更。
- 開始時間
- 4.2
繼承 NSObject、<NSclone> 和 <NSSecureCoding>。
- (instancetype) initWithType: |
|
(GCKNetworkAddressType) |
type |
ipAddress: |
|
(nullable NSString *) |
ipAddress |
|
|
| |
以指定位址類型和 IP 位址建構 GCKNetworkAddress。
- Parameters
-
type | The address type. |
ipAddress | The IP address, in textual form. May be nil to indicate the wildcard ("any") address. |
- (instancetype) initWithType: |
|
(GCKNetworkAddressType) |
type |
addressData: |
|
(nullable NSData *) |
addressData |
|
|
| |
以指定位址類型和原始地址建構 GCKNetworkAddress。
- Parameters
-
type | The address type. |
addressData | An NSData object containing the appropriate address structure (e.g., struct in_addr or struct in6_addr). For the GCKNNetworkAddressTypeIPC, the data is expected to be a UTF8 encoding. |
- (GCKNetworkAddressType) type |
|
readnonatomicassign |
做為包含適當位址結構的 NSData 網路位址 (例如 struct in_addr 或 struct in6_addr)。
如為位址類型 IPC,則欄位採用 UTF8 編碼。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-12-02 (世界標準時間)。
[null,null,["上次更新時間:2023-12-02 (世界標準時間)。"],[[["The `GCKNetworkAddress` class represents a network IP address and is immutable."],["It provides methods to construct network addresses of various types, including IPv4, IPv6, and IPC."],["You can obtain the address type, IP address string, and raw address data from instances of this class."],["The default initializer is not allowed; you must use designated initializers to create instances."]]],[]]