Note that network conditions, such as firewalls or proxies, might prevent the client from establishing a WebSocket connection. For this reason, you may wish to provide the BaseRealtime instance with the ability to alternatively establish a connection using long polling which is less susceptible to these external conditions. You do this by passing in the XHRPolling plugin, alongside WebSocketTransport:
Provides a BaseRealtime instance with the ability to establish a connection with the Ably realtime service using a WebSocket connection.
To create a client that includes this plugin, include it in the client options that you pass to the constructor:
Note that network conditions, such as firewalls or proxies, might prevent the client from establishing a WebSocket connection. For this reason, you may wish to provide the
BaseRealtime
instance with the ability to alternatively establish a connection using long polling which is less susceptible to these external conditions. You do this by passing in the XHRPolling plugin, alongsideWebSocketTransport
: