Sends a message into the channel.
Arguments to send to channel
Options to be used during the send process
const channel = supabase.channel('room1')
channel.subscribe((status) => {
if (status === 'SUBSCRIBED') {
channel.send({
type: 'broadcast',
event: 'cursor-pos',
payload: { x: Math.random(), y: Math.random() },
})
}
})
const channel = supabase.channel('room1')
try {
await channel.httpSend('cursor-pos', { x: Math.random(), y: Math.random() })
} finally {
await supabase.removeChannel(channel)
}