channel
//fluxbase-kotlin/io.github.nimbleflux.fluxbase/FluxbaseClient/channel
channel
Section titled “channel”[jvm]
fun channel(name: String, transport: WebSocketTransport? = null): RealtimeChannel
Create a realtime channel for postgres_changes/broadcast/presence subscriptions. Port of channel() in client.ts:654-674.
Usage:
val channel = client.channel("public:trips")channel.on("INSERT", PostgresChangesConfig(table = "trips")) { payload -> ... }channel.subscribe()