EventApi
‘EventApi’ is a class representing Endpoint’s API for context custom events.
Static Methods
create(connection:)
Creates an instance of ‘EventApi’.
Params
connection
inout Connection
instance of ‘Connection’
Returns
EventApi ·
EventApi object
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
subscribeFor(subscriptionQueries:)
Subscribe for the custom events on the given subscription query.
Params
subscriptionQueries
privmx.SubscriptionQueryVector
list of queries
Returns
privmx.SubscriptionIdVector ·
list of subscriptionIds in maching order to subscriptionQueries.
unsubscribeFrom(subscriptionIds:)
Unsubscribe from events for the given subscriptionId.
Params
subscriptionIds
privmx.SubscriptionIdVector
list of subscriptionId
buildSubscriptionQuery(channelName:selectorType:selectorId:)
Generate subscription Query for the Custom events.
Params
channelName
std.string
name of the Channel
selectorType
privmx.endpoint.event.EventSelectorType
selector of scope on which you listen for events
selectorId
std.string
ID of the selector
Returns
privmx.SubscriptionQuery ·
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.