feat(TypedSocket): Add SmartServe integration to TypedSocket, support SmartServe connections and tagging; update dependencies and docs; remove GitLab CI config
This commit is contained in:
@@ -1 +1,21 @@
|
||||
|
||||
# TypedSocket Hints
|
||||
|
||||
## SmartServe Integration (Added v3.1.0)
|
||||
|
||||
TypedSocket now supports SmartServe as an alternative WebSocket backend via `TypedSocket.fromSmartServe()`.
|
||||
|
||||
### Key Differences from Smartsocket Mode
|
||||
|
||||
1. **Tag System**: SmartServe uses `Set<string>` for tags, while Smartsocket uses `{id, payload}`. The wrapper stores payloads in `peer.data` with `__typedsocket_tag__` prefix.
|
||||
|
||||
2. **Request/Response**: Uses TypedRouter's `fireEventInterestMap` for async correlation when sending server-initiated requests.
|
||||
|
||||
3. **Lifecycle**: SmartServe manages WebSocket lifecycle. `typedSocket.stop()` only clears internal state.
|
||||
|
||||
4. **eventSubject**: Not fully supported in SmartServe mode - use SmartServe's `onConnectionOpen`/`onConnectionClose` hooks instead.
|
||||
|
||||
### Files Modified for SmartServe Support
|
||||
|
||||
- `ts/typedsocket.classes.typedsocket.ts` - Main implementation
|
||||
- `ts/typedsocket.plugins.ts` - Type imports
|
||||
- `package.json` - Optional peer dependency
|
||||
|
||||
Reference in New Issue
Block a user