feat(remote)!: make remote serve WebSocket-only and refuse older clients with CLIENT_OUTDATED

This commit is contained in:
imSp4rky
2026-12-05 09:47:22 -07:00
parent 641623590d
commit 00ad15527c
62 changed files with 657 additions and 2098 deletions
+6 -3
View File
@@ -18,8 +18,8 @@ from unshackle.core.remote_service import RemoteClient
def session_entry(**fields: Any) -> SessionEntry:
"""A remote session that the server CDM licenses, unless *fields* set another :class:`SessionEntry` value."""
return SessionEntry(
"""A remote session that the server CDM licenses and whose client attached its channel, unless *fields* say other."""
entry = SessionEntry(
**{
"session_id": "sess",
"service_tag": "EXAMPLE",
@@ -28,6 +28,8 @@ def session_entry(**fields: Any) -> SessionEntry:
**fields,
}
)
entry.presence.attached()
return entry
def session_launch(licensor: Licensor = Licensor.NO_DEVICE, **fields: Any) -> SessionLaunch:
@@ -75,4 +77,5 @@ def hold_session(service: Any, session_id: str | None = "sess") -> None:
client = SimpleNamespace(send=unreachable, timeout=1, tunnel=None)
service.lifetime = RemoteSessionLifetime(client, lambda cache: None) # type: ignore[arg-type]
if session_id:
service.lifetime.adopt(service.lifetime.name(), session_id)
service.lifetime._held.add(session_id)
service.lifetime.adopt(session_id)