คลาส GCKGameManagerChannel

การอ้างอิงคลาส GCKGameManagerChannel

ภาพรวม

GCKCastChannel คลาสย่อยสำหรับการดำเนินการควบคุมเกม

ดูโปรโตคอลการมอบสิทธิ์ได้ที่ GCKGameManagerChannelDelegate

Deprecated:
ระบบไม่รองรับ Game Manager API แล้วและจะนำออกในรุ่นต่อๆ ไป

รับค่า GCKCastChannel

สรุปวิธีการของอินสแตนซ์

(instancetype) - initWithSessionID:
 ตัวเริ่มต้นที่กำหนด เพิ่มเติม...
 
(instancetype) - init
 ตัวเริ่มต้นเริ่มต้นไม่พร้อมใช้งาน เพิ่มเติม...
 
(NSInteger) - sendPlayerAvailableRequest:
 ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์ที่ใช้ล่าสุดในผู้ส่งนี้เป็นสถานะ GCKPlayerStateAvailable เพิ่มเติม...
 
(NSInteger) - sendPlayerAvailableRequest:playerID:
 ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์เป็นสถานะ GCKPlayerStateAvailable เพิ่มเติม...
 
(NSInteger) - sendPlayerReadyRequest:
 ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์ที่ใช้ล่าสุดในผู้ส่งนี้เป็นสถานะ GCKPlayerStateReady เพิ่มเติม...
 
(NSInteger) - sendPlayerReadyRequest:playerID:
 ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์เป็นสถานะ GCKPlayerStateReady เพิ่มเติม...
 
(NSInteger) - sendPlayerPlayingRequest:
 ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์ที่ใช้ล่าสุดในผู้ส่งนี้เป็นสถานะ GCKPlayerStatePlaying เพิ่มเติม...
 
(NSInteger) - sendPlayerPlayingRequest:playerID:
 ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์เป็นสถานะ GCKPlayerStatePlaying เพิ่มเติม...
 
(NSInteger) - sendPlayerIdleRequest:
 ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์ที่ใช้ล่าสุดในผู้ส่งนี้เป็นสถานะ GCKPlayerStateIdle เพิ่มเติม...
 
(NSInteger) - sendPlayerIdleRequest:playerID:
 ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์เป็นสถานะ GCKPlayerStateIdle เพิ่มเติม...
 
(NSInteger) - sendPlayerQuitRequest:
 ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์ที่ใช้ล่าสุดในผู้ส่งนี้เป็นสถานะ GCKPlayerStateQuit เพิ่มเติม...
 
(NSInteger) - sendPlayerQuitRequest:playerID:
 ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์เป็นสถานะ GCKPlayerStateQuit เพิ่มเติม...
 
(NSInteger) - sendGameRequest:
 ส่งข้อความที่เจาะจงเกมไปยังผู้รับ เพิ่มเติม...
 
(NSInteger) - sendGameRequest:playerID:
 ส่งข้อความที่เจาะจงเกมไปยังผู้รับ เพิ่มเติม...
 
(void) - sendGameMessage:
 ส่งข้อความที่เจาะจงเกมไปยังผู้รับ เพิ่มเติม...
 
(void) - sendGameMessage:playerID:
 ส่งข้อความที่เจาะจงเกมไปยังผู้รับ เพิ่มเติม...
 
(instancetype) - initWithNamespace:
 ตัวเริ่มต้นที่กำหนด เพิ่มเติม...
 
(void) - didReceiveTextMessage:
 เรียกใช้เมื่อได้รับข้อความในช่องทางนี้ เพิ่มเติม...
 
(BOOL) - sendTextMessage:
 ส่งข้อความในช่องนี้ เพิ่มเติม...
 
(BOOL) - sendTextMessage:error:
 ส่งข้อความในช่องนี้ เพิ่มเติม...
 
(NSInteger) - generateRequestID
 สร้างรหัสคำขอสำหรับข้อความใหม่ เพิ่มเติม...
 
(NSNumber *__nullable) - generateRequestNumber
 เมธอดอำนวยความสะดวกซึ่งรวมผลลัพธ์ของ generateRequestID ไว้ใน NSNumber เพิ่มเติม...
 
(void) - didConnect
 เรียกใช้เมื่อเชื่อมต่อช่องนี้แล้ว ซึ่งบ่งบอกว่าตอนนี้สามารถแลกเปลี่ยนข้อความกับอุปกรณ์แคสต์ผ่านช่องนี้ได้แล้ว เพิ่มเติม...
 
(void) - didDisconnect
 เรียกใช้เมื่อช่องนี้ถูกตัดการเชื่อมต่อ ซึ่งบ่งบอกว่าไม่สามารถแลกเปลี่ยนข้อความกับอุปกรณ์ Cast ผ่านช่องนี้ได้อีกต่อไป เพิ่มเติม...
 

สรุปพร็อพเพอร์ตี้

id< GCKGameManagerChannelDelegatedelegate
 ผู้รับมอบสิทธิ์ในการรับการแจ้งเตือนจาก GCKGameManagerChannel เพิ่มเติม...
 
GCKGameManagerStatecurrentState
 สถานะปัจจุบันของตัวจัดการเกม เพิ่มเติม...
 
NSString * lastUsedPlayerID
 รหัสเพลเยอร์ที่ควบคุมได้ล่าสุดที่ใช้ในเซสชันนี้ เพิ่มเติม...
 
BOOL isInitialConnectionEstablished
 ช่องนี้เชื่อมต่อกับ Game Manager ของผู้รับหรือไม่ และเราพร้อมที่จะโต้ตอบกับช่องนี้หรือไม่ เพิ่มเติม...
 
NSString * protocolNamespace
 เนมสเปซของช่อง เพิ่มเติม...
 
BOOL isConnected
 การแจ้งที่ระบุว่าช่องนี้เชื่อมต่ออยู่หรือไม่ เพิ่มเติม...
 
GCKDeviceManagerdeviceManager
 ผู้จัดการอุปกรณ์ที่ลงทะเบียนช่องนี้ (หากมี) เพิ่มเติม...
 

รายละเอียดวิธีการ

- (instancetype) initWithSessionID: (NSString *)  castSessionID

ตัวเริ่มต้นที่กำหนด

เชื่อมต่อกับตัวจัดการเกมของผู้รับโดยอัตโนมัติ

Parameters
castSessionIDThe Session ID corresponding to the currently connected Game Manager.
- (instancetype) init

ตัวเริ่มต้นเริ่มต้นไม่พร้อมใช้งาน

ใช้ GCKCastChannel

- (NSInteger) sendPlayerAvailableRequest: (id __nullable)  extraData

ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์ที่ใช้ล่าสุดในผู้ส่งนี้เป็นสถานะ GCKPlayerStateAvailable

หากการเปลี่ยนสถานะนี้ไม่ถูกต้องสำหรับผู้เล่นรายนั้น ระบบจะทริกเกอร์ข้อผิดพลาดใน GCKGameManagerChannelDelegate หากไม่มีเพลเยอร์ที่ใช้ล่าสุด ระบบจะลงทะเบียนเพลเยอร์ใหม่และตั้งค่ารหัสเพลเยอร์เป็นรหัสเพลเยอร์ที่ใช้ล่าสุดเมื่อตัวรับตอบสนองต่อคำขอนี้ ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความ gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

ดูเพิ่มเติม
lastUsedPlayerID
Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (NSInteger) sendPlayerAvailableRequest: (id __nullable)  extraData
playerID: (NSString *)  playerID 

ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์เป็นสถานะ GCKPlayerStateAvailable

หากการเปลี่ยนสถานะนี้ไม่ถูกต้องสำหรับผู้เล่นรายนั้น ระบบจะทริกเกอร์ข้อผิดพลาดใน GCKGameManagerChannelDelegate หากไม่มีรหัสเพลเยอร์ nil ระบบจะลงทะเบียนเพลเยอร์ใหม่และตั้งค่ารหัสเพลเยอร์เป็นรหัสเพลเยอร์ที่ใช้ล่าสุดเมื่อตัวรับตอบกลับคำขอนี้ ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความ gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
playerIDThe player ID of the player whose state is to be changed.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (NSInteger) sendPlayerReadyRequest: (id __nullable)  extraData

ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์ที่ใช้ล่าสุดในผู้ส่งนี้เป็นสถานะ GCKPlayerStateReady

หากการเปลี่ยนผ่านนี้ไม่ถูกต้องสำหรับเพลเยอร์นั้น หรือหากไม่มีรหัสเพลเยอร์ที่ใช้ล่าสุด ระบบจะทริกเกอร์ข้อผิดพลาดใน GCKGameManagerChannelDelegate ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความ gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

ดูเพิ่มเติม
lastUsedPlayerID
Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (NSInteger) sendPlayerReadyRequest: (id __nullable)  extraData
playerID: (NSString *)  playerID 

ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์เป็นสถานะ GCKPlayerStateReady

หากการเปลี่ยนผ่านนี้ไม่ถูกต้องสำหรับเพลเยอร์นั้น หรือหากไม่มีรหัสเพลเยอร์ที่ใช้ล่าสุด ระบบจะทริกเกอร์ข้อผิดพลาดใน GCKGameManagerChannelDelegate ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความ gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
playerIDThe player ID of the player to change the state.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (NSInteger) sendPlayerPlayingRequest: (id __nullable)  extraData

ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์ที่ใช้ล่าสุดในผู้ส่งนี้เป็นสถานะ GCKPlayerStatePlaying

หากการเปลี่ยนผ่านนี้ไม่ถูกต้องสำหรับเพลเยอร์นั้น หรือหากไม่มีรหัสเพลเยอร์ที่ใช้ล่าสุด ระบบจะทริกเกอร์ข้อผิดพลาดใน GCKGameManagerChannelDelegate ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความ gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

ดูเพิ่มเติม
lastUsedPlayerID
Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (NSInteger) sendPlayerPlayingRequest: (id __nullable)  extraData
playerID: (NSString *)  playerID 

ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์เป็นสถานะ GCKPlayerStatePlaying

หากการเปลี่ยนผ่านนี้ไม่ถูกต้องสำหรับเพลเยอร์นั้น หรือหากไม่มีรหัสเพลเยอร์ที่ใช้ล่าสุด ระบบจะทริกเกอร์ข้อผิดพลาดใน GCKGameManagerChannelDelegate ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความ gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
playerIDThe player ID of the player to change the state.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (NSInteger) sendPlayerIdleRequest: (id __nullable)  extraData

ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์ที่ใช้ล่าสุดในผู้ส่งนี้เป็นสถานะ GCKPlayerStateIdle

หากการเปลี่ยนผ่านนี้ไม่ถูกต้องสำหรับเพลเยอร์นั้น หรือหากไม่มีรหัสเพลเยอร์ที่ใช้ล่าสุด ระบบจะทริกเกอร์ข้อผิดพลาดใน GCKGameManagerChannelDelegate ควรรอให้ระบบส่งข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback ก่อนจึงเรียกใช้เมธอดนี้ ข้อความที่ GCKGameManagerChannel::gameManagerChannel:requestDidFailWithID:error: delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของเครื่องรับ

ดูเพิ่มเติม
lastUsedPlayerID
Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (NSInteger) sendPlayerIdleRequest: (id __nullable)  extraData
playerID: (NSString *)  playerID 

ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์เป็นสถานะ GCKPlayerStateIdle

หากการเปลี่ยนผ่านนี้ไม่ถูกต้องสำหรับเพลเยอร์นั้น หรือหากไม่มีรหัสเพลเยอร์ที่ใช้ล่าสุด ระบบจะทริกเกอร์ข้อผิดพลาดใน GCKGameManagerChannelDelegate ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความ gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
playerIDThe player ID of the player to change the state.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (NSInteger) sendPlayerQuitRequest: (id __nullable)  extraData

ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์ที่ใช้ล่าสุดในผู้ส่งนี้เป็นสถานะ GCKPlayerStateQuit

หากการเปลี่ยนผ่านนี้ไม่ถูกต้องสำหรับเพลเยอร์นั้น หรือหากไม่มีรหัสเพลเยอร์ที่ใช้ล่าสุด ระบบจะทริกเกอร์ข้อผิดพลาดใน GCKGameManagerChannelDelegate ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความ gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

ดูเพิ่มเติม
lastUsedPlayerID
Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (NSInteger) sendPlayerQuitRequest: (id __nullable)  extraData
playerID: (NSString *)  playerID 

ส่งคำขอไปยังผู้รับเพื่อเปลี่ยนเพลเยอร์เป็นสถานะ GCKPlayerStateQuit

หากการเปลี่ยนผ่านนี้ไม่ถูกต้องสำหรับเพลเยอร์นั้น หรือหากไม่มีรหัสเพลเยอร์ที่ใช้ล่าสุด ระบบจะทริกเกอร์ข้อผิดพลาดใน GCKGameManagerChannelDelegate ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความไปยัง gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
playerIDThe player ID of the player to change the state.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (NSInteger) sendGameRequest: (id __nullable)  extraData

ส่งข้อความที่เจาะจงเกมไปยังผู้รับ

เนื้อหาของข้อความขึ้นอยู่กับแอปพลิเคชันทั้งหมด ข้อความจะมาจาก lastUsedPlayerID ผู้รับจะส่งการตอบกลับไปยังผู้ส่งรายนี้ผ่าน GCKGameManagerChannelDelegate ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความไปยัง gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ GameManager ของผู้รับ

Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (NSInteger) sendGameRequest: (id __nullable)  extraData
playerID: (NSString *)  playerID 

ส่งข้อความที่เจาะจงเกมไปยังผู้รับ

เนื้อหาของข้อความขึ้นอยู่กับแอปพลิเคชันทั้งหมด ข้อความจะมาจาก playerID หาก playerID เป็น nil ระบบจะใช้ lastUsedPlayerID ผู้รับจะส่งการตอบกลับไปยังผู้ส่งรายนี้ผ่าน GCKGameManagerChannelDelegate ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความ gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
playerIDThe id of the controllable player sending this message.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งคำขอไม่ได้
- (void) sendGameMessage: (id __nullable)  extraData

ส่งข้อความที่เจาะจงเกมไปยังผู้รับ

เนื้อหาของข้อความขึ้นอยู่กับแอปพลิเคชันทั้งหมด ข้อความจะมาจาก lastUsedPlayerID นี่เป็นวิธีแบบส่งแล้วจบ ซึ่งไม่มีการรับประกันว่าข้อความจะถูกส่งและผู้รับจะไม่ส่งการตอบกลับไปยังผู้ส่งรายนี้ ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความ gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
- (void) sendGameMessage: (id __nullable)  extraData
playerID: (NSString *)  playerID 

ส่งข้อความที่เจาะจงเกมไปยังผู้รับ

เนื้อหาของข้อความขึ้นอยู่กับแอปพลิเคชันทั้งหมด ข้อความจะมาจากรหัสผู้เล่นในพื้นที่ที่ระบุ ซึ่งเป็นวิธีแบบส่งแล้วส่งเลยที่ไม่มีการรับประกันว่าข้อความจะถูกส่ง และผู้รับจะไม่ส่งการตอบกลับไปยังผู้ส่งรายนี้ ควรเรียกใช้วิธีนี้หลังจากได้รับข้อความ gameManagerChannelDidConnect: (GCKGameManagerChannelDelegate-p) delegate callback แล้วเท่านั้น ส่งข้อความ gameManagerChannel:requestDidFailWithID:error: (GCKGameManagerChannelDelegate-p) delegate callback หาก GCKGameManagerChannel ยังไม่ได้เชื่อมต่อกับ Game Manager ของผู้รับ

Parameters
extraDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
playerIDThe ID of the controllable player sending this message.
- (instancetype) initWithNamespace: (NSString *)  protocolNamespace

ตัวเริ่มต้นที่กำหนด

สร้าง GCKCastChannel ใหม่ด้วยเนมสเปซที่ระบุ

Parameters
protocolNamespaceThe namespace.

ใช้งานใน GCKGenericChannel

- (void) didReceiveTextMessage: (NSString *)  message

เรียกใช้เมื่อได้รับข้อความในช่องทางนี้

การติดตั้งใช้งานเริ่มต้นจะไม่มีการดำเนินการ

Parameters
messageThe message.
- (BOOL) sendTextMessage: (NSString *)  message

ส่งข้อความในช่องนี้

Parameters
messageThe message.
การคืนสินค้า
YES เมื่อสำเร็จ หรือ NO หากส่งข้อความไม่ได้ (เนื่องจากไม่ได้เชื่อมต่อช่อง หรือเนื่องจากบัฟเฟอร์การส่งเต็มเกินไปในขณะนี้)
Deprecated:
ใช้ sendTextMessage:error: ซึ่งให้ข้อมูลข้อผิดพลาดโดยละเอียด
- (BOOL) sendTextMessage: (NSString *)  message
error: (GCKError *__nullable *__nullable)  error 

ส่งข้อความในช่องนี้

Parameters
messageThe message.
errorA pointer at which to store the error result. May be nil.
การคืนสินค้า
YES หากสำเร็จ หรือ NO หากส่งข้อความไม่ได้
- (NSInteger) generateRequestID

สร้างรหัสคำขอสำหรับข้อความใหม่

การคืนสินค้า
รหัสที่สร้างขึ้น หรือ kGCKInvalidRequestID หากช่องไม่ได้เชื่อมต่ออยู่ในขณะนี้
- (NSNumber * __nullable) generateRequestNumber

เมธอดอำนวยความสะดวกซึ่งรวมผลลัพธ์ของ generateRequestID ไว้ใน NSNumber

การคืนสินค้า
รหัสที่สร้างขึ้น หรือ nil หากช่องไม่ได้เชื่อมต่ออยู่ในขณะนี้
- (void) didConnect

เรียกใช้เมื่อเชื่อมต่อช่องนี้แล้ว ซึ่งบ่งบอกว่าตอนนี้สามารถแลกเปลี่ยนข้อความกับอุปกรณ์แคสต์ผ่านช่องนี้ได้แล้ว

การติดตั้งใช้งานเริ่มต้นจะไม่มีการดำเนินการ

- (void) didDisconnect

เรียกใช้เมื่อช่องนี้ถูกตัดการเชื่อมต่อ ซึ่งบ่งบอกว่าไม่สามารถแลกเปลี่ยนข้อความกับอุปกรณ์ Cast ผ่านช่องนี้ได้อีกต่อไป

การติดตั้งใช้งานเริ่มต้นจะไม่มีการดำเนินการ

รายละเอียดพร็อพเพอร์ตี้

- (id<GCKGameManagerChannelDelegate>) delegate
readwritenonatomicweak

ผู้รับมอบสิทธิ์ในการรับการแจ้งเตือนจาก GCKGameManagerChannel

- (GCKGameManagerState*) currentState
readnonatomicstrong

สถานะปัจจุบันของตัวจัดการเกม

- (NSString*) lastUsedPlayerID
readnonatomiccopy

รหัสเพลเยอร์ที่ควบคุมได้ล่าสุดที่ใช้ในเซสชันนี้

ซึ่งอาจเป็น nil หากไม่ได้ตั้งค่าโปรแกรมเล่นที่ควบคุมได้กับเครื่องรับ

ดูเพิ่มเติม
- sendPlayerAvailableRequest:
- (BOOL) isInitialConnectionEstablished
readnonatomicassign

ช่องนี้เชื่อมต่อกับ Game Manager ของผู้รับหรือไม่ และเราพร้อมที่จะโต้ตอบกับช่องนี้หรือไม่

วิธีนี้จะแสดง NO ตั้งแต่จุดที่สร้างช่องนี้

การคืนสินค้า
YES หากช่องนี้เชื่อมต่อกับตัวจัดการเกมของผู้รับและพร้อมโต้ตอบ NO มิฉะนั้น
- (NSString*) protocolNamespace
readnonatomiccopyinherited

เนมสเปซของช่อง

- (BOOL) isConnected
readnonatomicassigninherited

การแจ้งที่ระบุว่าช่องนี้เชื่อมต่ออยู่หรือไม่

- (GCKDeviceManager*) deviceManager
readnonatomicweakinherited

ผู้จัดการอุปกรณ์ที่ลงทะเบียนช่องนี้ (หากมี)

Deprecated:
หากช่องนี้ไม่ได้ลงทะเบียนกับคลาส GCKDeviceManager ที่เลิกใช้งานแล้ว ค่านี้จะเป็น nil