mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
To save size in modern browsers, JavaScript bundles built for the web.browser architecture no longer statically include the SockJS library. That's safe as long as native WebSockets actually work, but what if there's a problem with the network that necessitates falling back to long-polling or some other SockJS strategy? In those cases, we can load SockJS using a dynamic import(), which is a little slower than including it in the bundle, but that's OK because the module will be permanently cached in IndexedDB in production, and falling back to SockJS should be rare in modern browsers anyway. Note that this trick would not be possible if the implementation of dynamic import() still required a socket connection! (#9384)
socket-stream-client
Source code of released version | Source code of development version
This package provides the ClientStream abstraction used by the
ddp-client
package.