subscribe
Causes the client to create an open TCP socket to the PubNub Real-Time Network and begin listening for messages on a specified channel.
To subscribe to a channel the client must send the appropriate PNConfiguration.subscribeKey at initialization.
By default, a newly subscribed client will only receive messages published to the channel after the subscribe() call completes.
If a client gets disconnected from a channel, it can automatically attempt to reconnect to that channel and retrieve any available messages that were missed during that period. This can be achieved by setting PNConfiguration.retryConfiguration when initializing the client.
Parameters
Channels to subscribe/unsubscribe. Either channel or channelGroups are required.
Channel groups to subscribe/unsubscribe. Either channelGroups or channels are required.
Also subscribe to related presence channel.
A timetoken to start the subscribe loop from.