Created
April 22, 2022 13:06
-
-
Save thisisjofrank/37e6228e16e44900519e1ef6c168a780 to your computer and use it in GitHub Desktop.
Next we define some properties to store callbacks. When connection and election events occur, we'll call the appropriate callback to allow the application to trigger an appropriate action:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public onElection: (channel: Types.RealtimeChannelPromise) => void = () => {}; | |
public onConnection: (channel: Types.RealtimeChannelPromise) => void = () => {}; | |
public onSwarmPresenceChanged: (members: Types.PresenceMessage[]) => void = () => {}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment