EventApi

expect class EventApi(connection: Connection) : AutoCloseable

Manages PrivMX Bridge context custom events.

Parameters

connection

active connection to PrivMX Bridge

Throws

when passed Connection is not connected.

actual class EventApi(connection: Connection) : AutoCloseable

Manages PrivMX Bridge context custom events.

Parameters

connection

active connection to PrivMX Bridge

Throws

when passed Connection is not connected.

actual class EventApi(connection: Connection) : AutoCloseable

Manages PrivMX Bridge custom events.

Parameters

connection

active connection to PrivMX Bridge

Throws

when passed Connection is not connected.

Constructors

Link copied to clipboard
expect constructor(connection: Connection)
actual constructor(connection: Connection)
actual constructor(connection: Connection)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
expect open override fun close()

Frees memory.

actual open override fun close()

Frees memory.

actual open override fun close()

Frees memory.

Link copied to clipboard
expect fun emitEvent(contextId: String, users: List<UserWithPubKey>, channelName: String, eventData: ByteArray)

Emits the custom event on the given Context and channel.

actual fun emitEvent(contextId: String, users: List<UserWithPubKey>, channelName: String, eventData: ByteArray)

Emits the custom event on the given Context and channel.

actual external fun emitEvent(contextId: String, users: List<UserWithPubKey>, channelName: String, eventData: ByteArray)

Emits the custom event on the given Context and channel.

Link copied to clipboard
expect fun subscribeForCustomEvents(contextId: String, channelName: String)

Subscribe for the custom events on the given channel.

actual fun subscribeForCustomEvents(contextId: String, channelName: String)

Subscribe for the custom events on the given channel.

actual external fun subscribeForCustomEvents(contextId: String, channelName: String)

Subscribe for the custom events on the given channel.

Link copied to clipboard
expect fun unsubscribeFromCustomEvents(contextId: String, channelName: String)

Unsubscribe from the custom events on the given channel.

actual fun unsubscribeFromCustomEvents(contextId: String, channelName: String)

Unsubscribe from the custom events on the given channel.

actual external fun unsubscribeFromCustomEvents(contextId: String, channelName: String)

Unsubscribe from the custom events on the given channel.