# &lt;GCKGenericChannelDelegate&gt; Protocol

[Instance Methods](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_generic_channel_delegate-p#pub-methods) \<GCKGenericChannelDelegate\> Protocol Reference

## Overview

The [GCKGenericChannel](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_generic_channel "A generic GCKCastChannel implementation, suitable for use when subclassing is not desired...") delegate protocol.

Inherits \<GCKCastChannelNSObject\>.

|---|---|
| ## Instance Method Summary ||
| (void) | - [castChannel:didReceiveTextMessage:withNamespace:](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_generic_channel_delegate-p#ae8380f775bf364ba52d607fe10fc35a1) |
|   | Called when a text message has been received on the channel. [More...](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_generic_channel_delegate-p#ae8380f775bf364ba52d607fe10fc35a1) |
|   ||
| (void) | - [castChannelDidConnect:](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_generic_channel_delegate-p#a1ac3796c689bef52c383f4cf8be52e91) |
|   | Called when the channel has been connected, indicating that messages can now be exchanged with the Cast device over the channel. [More...](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_generic_channel_delegate-p#a1ac3796c689bef52c383f4cf8be52e91) |
|   ||
| (void) | - [castChannelDidDisconnect:](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_generic_channel_delegate-p#a89dcc4de26fc009b16360fef56dc7bde) |
|   | Called when the channel has been disconnected, indicating that messages can no longer be exchanged with the Cast device over the channel. [More...](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_generic_channel_delegate-p#a89dcc4de26fc009b16360fef56dc7bde) |
|   ||
| (void) | - [castChannel:didChangeWritableState:](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_generic_channel_delegate-p#a311e54518d64306de486bc0671bdce2c) |
|   | Called when the writable state of the channel has changed. [More...](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_generic_channel_delegate-p#a311e54518d64306de486bc0671bdce2c) |
|   ||

## Method Detail

|---|---|---|---|
| - (void) castChannel: |   | ([GCKGenericChannel](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_generic_channel) \*) | *channel* |
| didReceiveTextMessage: |   | (NSString \*) | *message* |
| withNamespace: |   | (NSString \*) | *protocolNamespace* |
|   |   |   |   |

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

|---|---|
| |---|---|---|---|---| | - (void) castChannelDidConnect: |   | ([GCKGenericChannel](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_generic_channel) \*) | *channel* |   | | optional |

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

Parameters
:

    |---|---|
    | channel | The channel. |


|---|---|
| |---|---|---|---|---| | - (void) castChannelDidDisconnect: |   | ([GCKGenericChannel](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_generic_channel) \*) | *channel* |   | | optional |

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

Parameters
:

    |---|---|
    | channel | The channel. |


|---|---|
| |---|---|---|---| | - (void) castChannel: |   | ([GCKCastChannel](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_cast_channel) \*) | *channel* | | didChangeWritableState: |   | (BOOL) | *writable* | |   |   |   |   | | optional |

Called when the writable state of the channel has changed.

Parameters
:

    |---|---|
    | channel | The channel. |
    | writable | Whether the channel is now writable. |


Since
:   4.0