channel

expect abstract fun channel(name: String): Channel
actual abstract fun channel(name: String): Channel

Create a handle to a Channel that can be used to obtain a Subscription.

The function is cheap to call, and the returned object is lightweight, as it doesn't change any client or server state. It is therefore permitted to use this method whenever a representation of a channel is required.

The returned Channel holds a reference to this PubNub instance internally.

Return

a Channel instance representing the channel with the given name

Parameters

name

the name of the channel to return. Supports wildcards by ending it with ".*". See more in the documentation

actual abstract fun channel(name: String): Channel