A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_cast_channel below:

GCKCastChannel Class | Google for Developers

GCKCastChannel Class

Stay organized with collections Save and categorize content based on your preferences.

A virtual communication channel for exchanging messages between a Cast sender and a Cast receiver.

Each channel is tagged with a unique namespace, so multiple channels may be multiplexed over a single network connection between a sender and a receiver.

A channel must be registered with a GCKCastSession before it can be used. When the associated session is established, the channel will be connected automatically and can then send and receive messages.

Subclasses should implement the didReceiveTextMessage: (GCKCastChannel) method to process incoming messages, and will typically provide additional methods for sending messages that are specific to a given namespace.

Inherits NSObject.

Inherited by GCKGenericChannel.

- (instancetype) initWithNamespace: (NSString *)  protocolNamespace

Designated initializer.

Constructs a new GCKCastChannel with the given namespace.

Parameters
protocolNamespace The namespace.

Implemented in GCKGenericChannel.

Default initializer is not available.

- (void) didReceiveTextMessage: (NSString *)  message

Called when a text message has been received on this channel.

The default implementation is a no-op.

Parameters
- (BOOL) sendTextMessage: (NSString *)  message error: (GCKError *_Nullable *_Nullable)  error 

Sends a text message on this channel.

Parameters
message The message. error A pointer at which to store the error result. May be nil.
Returns
YES on success or NO if the message could not be sent.
- (NSInteger) generateRequestID

Generates a request ID for a new message.

Returns
The generated ID, or kGCKInvalidRequestID if the channel is not currently connected.
- (nullable NSNumber *) generateRequestNumber

A convenience method which wraps the result of generateRequestID in an NSNumber.

Returns
The generated ID, or nil if the channel is not currently connected.

Called when this channel has been connected, indicating that messages can now be exchanged with the Cast device over this channel.

The default implementation is a no-op.

Called when this channel has been disconnected, indicating that messages can no longer be exchanged with the Cast device over this channel.

The default implementation is a no-op.

- (void) didChangeWritableState: (BOOL)  isWritable

Called when the writable state of this channel has changed.

The default implementation is a no-op.

Parameters
isWritable Whether the channel is now writable.
Since
4.0
- (NSString*) protocolNamespace readnonatomiccopy

The channel's namespace.

A flag indicating whether this channel is currently connected.

A flag indicating whether this channel is currently writable.

Since
4.0

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-09-18 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["The `GCKCastChannel` class enables communication between a Cast sender and receiver using namespaces for message exchange."],["Channels need registration with a `GCKCastSession` for connection and message handling."],["Subclasses should implement `didReceiveTextMessage:` to process incoming messages and may define namespace-specific sending methods."],["Key properties include `protocolNamespace`, `isConnected`, and `isWritable` to manage channel behavior."],["Methods like `sendTextMessage:` and `generateRequestID` facilitate message transmission and request management."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4