SECUREXSECURITY ENGINEERINGNVR 文档

WebSocket

WebSocket 适合实时 UI 状态、进度和推送更新。反向代理必须支持连接升级,客户端也要处理重连和服务器重启。

核心说明

本页内容按该功能本身整理,不再使用通用占位说明。以下项目均与当前主题直接相关。

Upgrade

代理缺少 Upgrade/Connection 头时通常表现为连接立即关闭或一直 pending。

心跳

长连接应有超时/心跳策略,网络切换后重新建立。

认证

WebSocket 应使用与 Web/API 一致的认证上下文。

降级

WebSocket 不可用时可降级为低频轮询,但不要造成高频 API 压力。

验证与排查

  • 修改或执行前记录当前版本/配置,以便回退。
  • 完成后同时检查 UI 状态和后端日志,不只看一个成功提示。
  • 如果问题只在单个摄像头/插件出现,先做最小范围对比,避免全局改动。

WebSocket

WebSocket is suited to realtime UI updates and progress. Reverse proxies must allow upgrades and clients must reconnect cleanly.

Core behavior

This page is topic-specific rather than a generic placeholder.

Upgrade

Missing proxy upgrade headers causes immediate close/pending connections.

Heartbeat

Use heartbeat/timeouts and reconnect after network changes.

Auth

WebSocket should share the same auth context as the API.

Fallback

Use low-frequency polling as fallback.

Verification and troubleshooting

  • Record the current version/config before changes so rollback is possible.
  • Verify both UI state and backend logs after the change.
  • If only one camera/plugin is affected, isolate it before making global changes.

WebSocket

WebSocket sirve para actualizaciones en tiempo real; el proxy debe permitir upgrade y el cliente reconectar.

Comportamiento

Esta página contiene contenido específico del tema, no un texto genérico.

Upgrade

Cabeceras faltantes causan cierre o pending.

Heartbeat

Use heartbeat/timeout y reconexión.

Auth

Debe compartir contexto de autenticación.

Fallback

Use sondeo de baja frecuencia.

Verificación y diagnóstico

  • Registre versión/configuración antes de cambiar para poder revertir.
  • Compruebe UI y logs del backend después.
  • Si afecta a una sola cámara/plugin, aíslelo antes de cambios globales.
输入关键词开始搜索