使用带有 DataChannel 的 coTurn TCP 分配 [英] Using coTurn TCP allocations with DataChannel

查看:39
本文介绍了使用带有 DataChannel 的 coTurn TCP 分配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经配置了一个 coturn 服务器,我需要将它与 DataChannel 一起用于聊天应用程序.

I have configured a coturn server which I need to use with DataChannel for a chat app.

我正在努力让 coturn 服务器为我提供 tcp 分配.

I am trying to reach a point where I can get the coturn server provide me with a tcp allocation.

我在 JS 客户端中使用 RTCPeerConnection 的标准调用,提供轮询 URI、用户名和凭据.

I am using the standard call of RTCPeerConnection in JS client, providing the turn URI, username and credentials.

我在 URI 参数中提供的传输是 TCP ?transport=tcp.

The transport I am providing in the URI params is TCP ?transport=tcp.

有了这一切,我总是收到 UDP 分配,服务器记录 ChannelBind 请求(基于 UDP)

With all this, I am always receiving a UDP allocation and the server logs ChannelBind requests (UDP based)

问题:

如何通过 webRTC 客户端实现 TCP 分配,以确保在使用我的中继服务器的情况下聊天应用程序的正确数据传输?

How can I achieve TCP allocations throught webRTC client, to guarantee proper data delivery of the chat app in case of using my relay server?

推荐答案

RFC 6062,WebRTC 不支持在 TURN 服务器上打开 TCP 端口..它在规范中是可选的,没有人需要它,因为可靠性由 SCTP 提供.

RFC 6062, opening a TCP port on the TURN server is not supported by WebRTC. It is optional in the spec and nobody needs it since reliability is provided by SCTP.

反过来uri中的TCP是指客户端和TURN服务器之间的协议

TCP in the turn uri refers to the protocol between the client and the TURN server

这篇关于使用带有 DataChannel 的 coTurn TCP 分配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆