wse-client 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -175,6 +175,13 @@ token = rust_jwt_encode(
175
175
  | `presence_enabled` | False | Enable per-topic presence tracking |
176
176
  | `presence_max_data_size` | 4096 | Max bytes for a user's presence metadata |
177
177
  | `presence_max_members` | 0 | Max tracked members per topic (0 = unlimited) |
178
+ | `max_outbound_queue_bytes` | 16777216 | Per-connection outbound buffer limit (bytes, default 16 MB). Messages dropped when exceeded |
179
+ | `jwt_cookie_name` | "access_token" | Cookie name for JWT token extraction |
180
+ | `rate_limit_capacity` | 100000.0 | Token bucket capacity per connection |
181
+ | `rate_limit_refill` | 10000.0 | Token bucket refill rate per second |
182
+ | `max_message_size` | 1048576 | Maximum WebSocket frame size in bytes (default 1 MB) |
183
+ | `ping_interval` | 25 | Server-initiated ping interval in seconds |
184
+ | `idle_timeout` | 60 | Force-close connections idle for this many seconds |
178
185
 
179
186
  ---
180
187
 
@@ -403,9 +410,9 @@ Full security documentation: [docs/SECURITY.md](docs/SECURITY.md)
403
410
 
404
411
  ## Wire Protocol
405
412
 
406
- WSE uses a custom wire protocol with category-prefixed messages:
413
+ WSE uses a custom wire protocol with categorized JSON messages:
407
414
 
408
- **Text frames:** `WSE{...}` (system), `S{...}` (snapshot), `U{...}` (update) + JSON envelope
415
+ **Text frames:** JSON with `c` field for category: `"WSE"` (system), `"S"` (snapshot), `"U"` (update)
409
416
 
410
417
  **Binary frames:** `C:` (zlib compressed), `M:` (MessagePack), `E:` (AES-GCM encrypted), raw zlib (0x78 magic byte)
411
418
 
@@ -499,10 +506,10 @@ Benchmarked on AMD EPYC 7502P (32 cores / 64 threads, 128 GB RAM), Ubuntu 24.04.
499
506
 
500
507
  | Mode | Peak Throughput | Connections | Message Loss |
501
508
  |------|----------------|-------------|--------------|
502
- | Standalone (fan-out) | 5.0M deliveries/s | 500K | 0% |
509
+ | Standalone (fan-out) | 4.7M deliveries/s | 100K | 0% |
503
510
  | Standalone (inbound JSON) | 14.7M msg/s | 500K | 0% |
504
511
  | Standalone (inbound msgpack) | 30M msg/s | 500K | 0% |
505
- | Cluster (2 nodes) | 9.5M deliveries/s | 20K per node | 0% |
512
+ | Cluster (2 nodes, 50/50) | 6.6M deliveries/s | 500 per node | 0% |
506
513
 
507
514
  Sub-millisecond latency. Median 0.38ms with JWT authentication. Connection handshake: 0.53ms median (Rust JWT path).
508
515
 
@@ -1,5 +1,5 @@
1
1
  export declare const WS_PROTOCOL_VERSION = 1;
2
- export declare const WS_CLIENT_VERSION = "2.1.0";
2
+ export declare const WS_CLIENT_VERSION = "2.1.1";
3
3
  export declare const HEARTBEAT_INTERVAL = 15000;
4
4
  export declare const IDLE_TIMEOUT = 40000;
5
5
  export declare const CONNECTION_TIMEOUT = 10000;
package/dist/constants.js CHANGED
@@ -5,7 +5,7 @@
5
5
  // Protocol Constants
6
6
  // ---------------------------------------------------------------------------
7
7
  export const WS_PROTOCOL_VERSION = 1;
8
- export const WS_CLIENT_VERSION = '2.1.0';
8
+ export const WS_CLIENT_VERSION = '2.1.1';
9
9
  // ---------------------------------------------------------------------------
10
10
  // Connection Constants
11
11
  // ---------------------------------------------------------------------------
package/dist/index.d.ts CHANGED
@@ -21,5 +21,5 @@ export type { OfflineQueueConfig } from './services/OfflineQueue';
21
21
  export { EventHandlers } from './handlers/EventHandlers';
22
22
  export { registerAllHandlers } from './handlers/index';
23
23
  export * from './constants';
24
- export declare const WSE_VERSION = "2.1.0";
24
+ export declare const WSE_VERSION = "2.1.1";
25
25
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -44,5 +44,5 @@ export * from './constants';
44
44
  // ---------------------------------------------------------------------------
45
45
  // Version Info
46
46
  // ---------------------------------------------------------------------------
47
- export const WSE_VERSION = '2.1.0';
47
+ export const WSE_VERSION = '2.1.1';
48
48
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wse-client",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "WSE (WebSocket Engine) React client. Type-safe hooks, auto-reconnect, offline queue, E2E encryption.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",