dataSync

open fun dataSync(pubnub: PubNub, result: PNDataSyncEventResult)

Receive DataSync realtime events on subscribed ref-channels.

A single subscribed ref-channel delivers a mix of leaf types; branch on the sealed PNDataSyncEventResult.extractedMessage. This exposes the Kotlin PNDataSyncEventResult directly (a conscious cross-SDK choice — DataSync does not ship Java-specific per-type result models, unlike objects).