คลาส GCKNetworkAddress
ออบเจ็กต์ที่แสดงถึงที่อยู่ IP ของเครือข่าย
ออบเจ็กต์นี้จะเปลี่ยนแปลงไม่ได้
- Since
- 4.2
รับค่า NSObject, <NSCopying> และ <NSSecureCoding>
ไม่อนุญาตให้ใช้ตัวตั้งต้นเริ่มต้น
- (instancetype) initWithType: |
|
(GCKNetworkAddressType) |
type |
ipAddress: |
|
(nullable NSString *) |
ipAddress |
|
|
| |
สร้าง GCKNetworkAddress ที่มีประเภทที่อยู่และที่อยู่ IP ที่ระบุ
- 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. |
สร้างที่อยู่ไวลด์การ์ดสำหรับประเภทที่ระบุ
สร้างที่อยู่ Loopback ของประเภทที่กำหนด
สร้างที่อยู่ IPv4 สำหรับการออกอากาศ
- (GCKNetworkAddressType) type |
|
readnonatomicassign |
ที่อยู่เครือข่ายเป็น NSData ที่มีโครงสร้างของที่อยู่ที่เหมาะสม (เช่น struct in_addr หรือ struct in6_addr)
สำหรับประเภทที่อยู่ IPC ช่องนี้เป็นการเข้ารหัส UTF8
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-12-02 UTC
[null,null,["อัปเดตล่าสุด 2023-12-02 UTC"],[[["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."]]],["The `GCKNetworkAddress` class represents an immutable network IP address. Key actions include: constructing addresses with specified type and IP/raw address using `initWithType:ipAddress:` or `initWithType:addressData:`, creating wildcard addresses with `wildcardAddressOfType:`, loopback addresses with `loopbackAddressOfType:`, or IPv4/IPv6/IPC addresses with corresponding methods. It has properties that return the address's type, IP address, and network data representation. The default initializer is not allowed.\n"]]