realtime
29 blocks in 5 groups. Open a block for its pins, an example and how it behaves.
expiring sets
- touch expiring set
conditionv15.0.2Adds a member to an expiring set forttl_ms, or renews it: staff on shift while their heartbeats keep arriving, a job claimed while its worker reports progress. - on expiring set change
execute_functionv15.0.2Runs when a member joins or leaves an expiring set whose name starts with the prefix inevent: a device coming online indevices:, a member of staff whose shift heartbeats stopped inshifts:. Once per change, across the cluster. - expiring set members
arrayv15.0.2The members of an expiring set, with their data and since when: the devices online at a site, the staff on shift at a depot. - add to expiring set
conditionv15.0.2Adds a member to an expiring set, held by the running socket (until it closes, then forlinger_ms) or forttl_ms: a device that stays online while its connection does, a worker that stays in a pool while it is connected. - remove from expiring set
conditionv15.0.2Takes a member out of an expiring set now, or withhold_onlydrops only the running socket's hold: a device taken out of service, a worker leaving its pool.
notifications
- send notification
conditionv15.0.2Sends a phone notification to users' registered devices or to given devices, through APNs and FCM. - remove device
conditionv15.0.2Removes a device by its token, or clears a VoIP token from its device. - register device
conditionv15.0.2Registers a device's notification token for a user. - devices
conditionv15.0.2A user's registered devices.
realtime
- disconnect
conditionv15.0.2Closes sockets: the run's, a session's or every socket of a user, after an optional last push. - on socket disconnect
execute_functionv15.0.2Runs once per realtime socket when it closes, with the reason: client_closed, server_closed, kicked, token_revoked, write_queue_full, rate_limited, drained or node_lost. node_lost fires from another node for the sockets of a node that died. - rooms
objectv15.0.2A session's rooms, each with the seq it was joined at. - subscribe
conditionv15.0.2Adds rooms to a socket's session, a session or every session of a user, on any node. - unsubscribe
conditionv15.0.2Removes rooms from a socket's session, a session or every session of a user, on any node. - on socket method
execute_functionv15.0.2Answers a realtime socket method by name: the method inevent, the function on On Method. - push
conditionv15.0.2Pushes a frame to every socket in the rooms, on every node. - on socket before
execute_functionv15.0.2Runs before every socket method of the entity; if it answers, the method does not run. Where the gates every method passes through go. - on socket connect
execute_functionv15.0.2Runs when a realtime socket has upgraded, before its first frame. The function gets socket.
socket
- current socket
socketconnectionv15.0.2The realtime socket the running method or trigger came from. - api request for the socket
conditionv15.0.3Sends a request to this core's own API on behalf of the socket of the run, in process: the route sees the socket's address, user agent and host. - open session
conditionv15.0.2Authenticates the socket with an access token and creates or resumes its session. - answer
conditionv15.0.2Answers the socket method that is running:{method, payload, request_id}, or the error code inerror.
voice
- close room
conditionv15.0.2Ends a voice room: everyone is disconnected and the room's node placement is released. - receive voice event
conditionv15.0.2Verifies an event a voice node posted and reads it: somebody joined, left, published a track, a room ended. - room participants
conditionv15.0.2Who is in a voice room now, as the node sees it. - send room data
conditionv15.0.2Sends a message on a voice room's data channel, from the server. - remove participant
conditionv15.0.2Disconnects a participant from a voice room. - update participant
conditionv15.0.2Changes a participant in the live room: mute, deafen, let speak, rename, new metadata. No reconnect. - voice token
conditionv15.0.2Lets one person into a voice or video room: a signed join token and the node to connect to.