Const
Provides a BaseRealtime instance with the ability to establish a connection with the Ably realtime service using the browser’s XMLHttpRequest API.
XHRPolling uses HTTP long polling; that is, it will make a new HTTP request each time a message is received from Ably.
XHRPolling
import { BaseRealtime, WebSocketTransport, FetchRequest } from 'ably/modular';const realtime = new BaseRealtime({ ...options, plugins: { XHRPolling, FetchRequest } }); Copy
import { BaseRealtime, WebSocketTransport, FetchRequest } from 'ably/modular';const realtime = new BaseRealtime({ ...options, plugins: { XHRPolling, FetchRequest } });
Provide this plugin if, for example, you wish the client to have an alternative mechanism for connecting to Ably if it’s unable to establish a WebSocket connection.
Generated using TypeDoc
Provides a BaseRealtime instance with the ability to establish a connection with the Ably realtime service using the browser’s XMLHttpRequest API.
XHRPolling
uses HTTP long polling; that is, it will make a new HTTP request each time a message is received from Ably.Provide this plugin if, for example, you wish the client to have an alternative mechanism for connecting to Ably if it’s unable to establish a WebSocket connection.