mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Refactor the DDP transport layer into a pluggable architecture where transports are isolated modules behind a common interface. This allows benchmarking and comparing different WebSocket implementations on the same build, same Node version, same machine. Available transports (selectable via DDP_TRANSPORT env var or settings): - sockjs: SockJS (current default, backward compatible) - faye: faye-websocket (direct WebSocket, no SockJS overhead) - ws: ws npm package (most popular Node.js WebSocket library) - uws: uWebSockets.js (C++ high-performance transport) Client-side: when transport != sockjs, SockJS is never loaded (dynamic import), saving ~57 KB from the client bundle. Native WebSocket is used instead. Configuration: - DDP_TRANSPORT=ws (env var) - settings.packages['ddp-server'].transport = 'ws' - DISABLE_SOCKJS=1 still works (resolves to 'faye') Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.