wse-server 2.0.1__tar.gz → 2.0.2__tar.gz
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.
- {wse_server-2.0.1 → wse_server-2.0.2}/PKG-INFO +4 -4
- {wse_server-2.0.1 → wse_server-2.0.2}/README.md +3 -3
- {wse_server-2.0.1 → wse_server-2.0.2}/pyproject.toml +1 -1
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/Cargo.lock +1 -1
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/Cargo.toml +1 -1
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/server.rs +9 -1
- {wse_server-2.0.1 → wse_server-2.0.2}/wse_server/__init__.py +1 -1
- {wse_server-2.0.1 → wse_server-2.0.2}/LICENSE +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/.cargo/config.toml +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/jwt.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/lib.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/cluster.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/compression.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/filters.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/mod.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/presence.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/queue.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/rate_limiter.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/recovery.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/reliability.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/security.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/sequencer.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/rust/src/wse/transformer.rs +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/wse_server/_wse_accel.pyi +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/wse_server/core/__init__.py +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/wse_server/core/filters.py +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/wse_server/core/types.py +0 -0
- {wse_server-2.0.1 → wse_server-2.0.2}/wse_server/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wse-server
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -504,7 +504,7 @@ client.run_forever()
|
|
|
504
504
|
|
|
505
505
|
Key features: 4 reconnect strategies (exponential, linear, fibonacci, adaptive), connection pool with health scoring and 3 load balancing strategies, circuit breaker, token bucket rate limiter, event sequencer with dedup and reorder buffering, network quality monitoring (latency/jitter/packet loss).
|
|
506
506
|
|
|
507
|
-
See [python-client/
|
|
507
|
+
See [python-client/](python-client/) for full source and examples.
|
|
508
508
|
|
|
509
509
|
### TypeScript / React
|
|
510
510
|
|
|
@@ -530,13 +530,13 @@ function App() {
|
|
|
530
530
|
|
|
531
531
|
Key features: offline queue with IndexedDB persistence, adaptive quality management, connection pool with health scoring, E2E encryption (Web Crypto API), message batching, 5 priority levels, Zustand store for external state access.
|
|
532
532
|
|
|
533
|
-
See [client/
|
|
533
|
+
See [client/](client/) for full source and examples.
|
|
534
534
|
|
|
535
535
|
---
|
|
536
536
|
|
|
537
537
|
## Performance
|
|
538
538
|
|
|
539
|
-
Benchmarked on AMD EPYC 7502P (64
|
|
539
|
+
Benchmarked on AMD EPYC 7502P (32 cores / 64 threads, 128 GB RAM), Ubuntu 24.04.
|
|
540
540
|
|
|
541
541
|
| Mode | Peak Throughput | Connections | Message Loss |
|
|
542
542
|
|------|----------------|-------------|--------------|
|
|
@@ -463,7 +463,7 @@ client.run_forever()
|
|
|
463
463
|
|
|
464
464
|
Key features: 4 reconnect strategies (exponential, linear, fibonacci, adaptive), connection pool with health scoring and 3 load balancing strategies, circuit breaker, token bucket rate limiter, event sequencer with dedup and reorder buffering, network quality monitoring (latency/jitter/packet loss).
|
|
465
465
|
|
|
466
|
-
See [python-client/
|
|
466
|
+
See [python-client/](python-client/) for full source and examples.
|
|
467
467
|
|
|
468
468
|
### TypeScript / React
|
|
469
469
|
|
|
@@ -489,13 +489,13 @@ function App() {
|
|
|
489
489
|
|
|
490
490
|
Key features: offline queue with IndexedDB persistence, adaptive quality management, connection pool with health scoring, E2E encryption (Web Crypto API), message batching, 5 priority levels, Zustand store for external state access.
|
|
491
491
|
|
|
492
|
-
See [client/
|
|
492
|
+
See [client/](client/) for full source and examples.
|
|
493
493
|
|
|
494
494
|
---
|
|
495
495
|
|
|
496
496
|
## Performance
|
|
497
497
|
|
|
498
|
-
Benchmarked on AMD EPYC 7502P (64
|
|
498
|
+
Benchmarked on AMD EPYC 7502P (32 cores / 64 threads, 128 GB RAM), Ubuntu 24.04.
|
|
499
499
|
|
|
500
500
|
| Mode | Peak Throughput | Connections | Message Loss |
|
|
501
501
|
|------|----------------|-------------|--------------|
|
|
@@ -675,6 +675,12 @@ fn build_server_ready(conn_id: &str, user_id: &str, recovery_enabled: bool) -> S
|
|
|
675
675
|
// ---------------------------------------------------------------------------
|
|
676
676
|
|
|
677
677
|
async fn handle_connection(stream: TcpStream, addr: SocketAddr, state: Arc<SharedState>) {
|
|
678
|
+
// Early rejection before expensive handshake (best-effort, authoritative check below)
|
|
679
|
+
if state.connection_count.load(Ordering::Relaxed) >= state.max_connections {
|
|
680
|
+
eprintln!("[WSE] Max connections reached (early check), rejecting {addr}");
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
|
|
678
684
|
// Clone the TCP stream FD for pre-framed raw writes (bypasses tungstenite).
|
|
679
685
|
let (stream, mut raw_write) = match clone_tcp_stream(stream) {
|
|
680
686
|
Ok(pair) => pair,
|
|
@@ -777,7 +783,9 @@ async fn handle_connection(stream: TcpStream, addr: SocketAddr, state: Arc<Share
|
|
|
777
783
|
}
|
|
778
784
|
}
|
|
779
785
|
Err(e) => {
|
|
780
|
-
|
|
786
|
+
eprintln!("[WSE] JWT validation failed for {addr}: {e}");
|
|
787
|
+
reject_ws_auth(&tx, rx, write_half, "AUTH_FAILED", "Authentication failed")
|
|
788
|
+
.await;
|
|
781
789
|
return;
|
|
782
790
|
}
|
|
783
791
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|