mirror of
https://github.com/MatrixSeven/file-transfer-go.git
synced 2026-05-06 17:17:33 +08:00
实现 WebRTC 数据通道管理器的 P2P 和 WS 中继模式支持,添加中继服务以处理 P2P 失败时的降级方案,更新相关接口和状态管理,增强错误处理和消息转发功能。
This commit is contained in:
@@ -53,6 +53,10 @@ func setupAPIRoutes(r *chi.Mux, h *handlers.Handler) {
|
||||
r.Get("/api/ws/webrtc", h.HandleWebRTCWebSocket)
|
||||
r.Get("/ws/webrtc", h.HandleWebRTCWebSocket)
|
||||
|
||||
// WebSocket 数据中继路由(P2P降级方案)
|
||||
r.Get("/api/ws/relay", h.HandleRelayWebSocket)
|
||||
r.Get("/ws/relay", h.HandleRelayWebSocket)
|
||||
|
||||
// WebRTC房间API
|
||||
r.Post("/api/create-room", h.CreateRoomHandler)
|
||||
r.Get("/api/room-info", h.WebRTCRoomStatusHandler)
|
||||
|
||||
Reference in New Issue
Block a user