EventApi
Static Methods
create(connection:)
Creates a new instance of EventApi
from a Connection
object.
This method initializes the EventApi
instance, enabling CustomEvent-related operations over the specified connection.
Params
connection
inout Connection
The connection object to be used for interacting with Custom Events.
Returns
EventApi
·
A newly created EventApi
instance.
Methods
emitEvent(contextId:users:channelName:eventData:)
Emits the custom event on the given Context and channel.
Params
contextId
std.string
ID of the Context
users
privmx.UserWithPubKeyVector
event’s data
channelName
std.string
list of UserWithPubKey objects which defines the recipients of the event
eventData
privmx.endpoint.core.Buffer
name of the Channel
subscribeForCustomEvents(contextId:channelName:)
Subscribe for the custom events on the given channel.
Params
contextId
std.string
ID of the Context
channelName
std.string
name of the Channel
unsubscribeFromCustomEvents(contextId:channelName:)
Unsubscribe from the custom events on the given channel.
Params
contextId
std.string
ID of the Context
channelName
std.string
name of the Channel
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.
PrivMX Endpoint Swift v2.3