Files
meteor/packages/socket-stream-client
dupontbertrand 86506f0918 ddp-server: pluggable transport architecture for WebSocket
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>
2026-03-24 19:51:21 +01:00
..
2026-03-12 13:48:08 -03:00

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.