diff --git a/README.md b/README.md index bff0fa2..eb8f781 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,9 @@ wsOpts = { // E.g. In nodejs, you could specify WebsocketPolyfill = require('ws') WebsocketPolyfill: Websocket, // Specify an existing Awareness instance - see https://github.com/yjs/y-protocols - awareness: new awarenessProtocol.Awareness(ydoc) + awareness: new awarenessProtocol.Awareness(ydoc), + // Specify the maximum amount to wait between reconnects (we use exponential backoff). + maxBackoffTime: 2500 } ``` @@ -94,6 +96,12 @@ wsOpts = {
wsProvider.on('sync', function(isSynced: boolean))
wsProvider.on('status', function({ status: 'disconnected' | 'connecting' | 'connected' }))
+ wsProvider.on('connection-close', function(WSClosedEvent))
+ wsProvider.on('connection-error', function(WSErrorEvent))
+