總覽
代表網路 IP 位址的物件。
這個物件無法變更。
- 開始時間
- 4.2
繼承 NSObject、<NSclone> 和 <NSSecureCoding>。
執行個體方法摘要 | |
(instancetype) | - init |
不得使用預設初始化器。更多... | |
(instancetype) | - initWithType:ipAddress: |
以指定位址類型和 IP 位址建構 GCKNetworkAddress。更多... | |
(instancetype) | - initWithType:addressData: |
以指定位址類型和原始地址建構 GCKNetworkAddress。更多... | |
類別方法摘要 | |
(GCKNetworkAddress *) | + wildcardAddressOfType: |
建構指定類型的萬用字元位址。更多... | |
(GCKNetworkAddress *) | + loopbackAddressOfType: |
建構指定類型的回送位址。更多... | |
(GCKNetworkAddress *) | + IPv4BroadcastAddress |
建構 IPv4 廣播位址。更多... | |
(GCKNetworkAddress *) | + addressWithIPv4Address: |
建構 IPv4 位址。更多... | |
(GCKNetworkAddress *) | + addressWithIPv6Address: |
建構 IPv6 位址。更多... | |
(GCKNetworkAddress *) | + addressWithIPCPath: |
建構 IPC 位址。更多... | |
資源摘要 | |
GCKNetworkAddressType | type |
地址類型。更多... | |
NSString * | ipAddress |
IP 位址。更多... | |
NSData * | addressData |
做為包含適當位址結構的 NSData 網路位址 (例如 struct in_addr 或 struct in6_addr)。更多... | |
方法詳細資料
- (instancetype) init |
不得使用預設初始化器。
- (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.
+ (GCKNetworkAddress *) wildcardAddressOfType: | (GCKNetworkAddressType) | type |
建構指定類型的萬用字元位址。
+ (GCKNetworkAddress *) loopbackAddressOfType: | (GCKNetworkAddressType) | type |
建構指定類型的回送位址。
+ (GCKNetworkAddress *) IPv4BroadcastAddress |
建構 IPv4 廣播位址。
+ (GCKNetworkAddress *) addressWithIPv4Address: | (NSString *) | ipAddress |
建構 IPv4 位址。
+ (GCKNetworkAddress *) addressWithIPv6Address: | (NSString *) | ipAddress |
建構 IPv6 位址。
+ (GCKNetworkAddress *) addressWithIPCPath: | (NSString *) | path |
建構 IPC 位址。
資源詳情
|
readnonatomicassign |
地址類型。
|
readnonatomiccopy |
IP 位址。
|
readnonatomiccopy |
做為包含適當位址結構的 NSData 網路位址 (例如 struct in_addr 或 struct in6_addr)。
如為位址類型 IPC,則欄位採用 UTF8 編碼。