问题
I am new to WebRTC.
I need to configure my own turn server for my webrtc application.
I was installed my turn server using the below command.
apt-get install coturn
I need to run the turn server over tcp only. It don't have to use the UDP for anything for the media transfer also it have to use the TCP only.
So, I was run the turn server using the below command.
turnserver -n -a -v --no-udp --min-port 9002 --max-port 9008 --no-dtls -r "bksystems.org" --listening-port 9001 -X 13.126.11.252 -u sureshkumar:sureshkumar
In this I was set the minimum port and maximum port range for the ice candidate selection.
In webrtc application I was configured my turn server address like the below.
var configuration = {
iceServers: [
{
url: "turn:13.126.11.252:9001?transport=tcp",
credential: 'sureshkumar',
username: 'sureshkumar'
}
]
};
The problem I was faced is only one connection is accepted by the turn server. For example the client 1 and client 2 are behind a symmetric NAT it have to make the video chatting using WebRTC. For this I was used a turn server.
The turn server only accepts one connection at a time. I don't know why it does not accepts the second connection. Once it accepts two connections then only they can able to communicate each other using the turn server.
For me the provided port range is only 9000 to 9008. In that I was run the signaling server in port number 9000 and the turn server in 9001 for the tcp listening. All the ports are only opened for the TCP only. It does not support for the UDP. For the media path communication also I have to use tcp only.
My questions are,
Why i have facing the issue like only one connection is gets establishing successfully to the turn server ?
To transfer a media path the turn server can able to use TCP or not. If not then what is the use of configuring a ?transport=tcp in webrtc client application.
来源:https://stackoverflow.com/questions/44625909/why-the-turn-server-does-not-support-for-the-tcp-connection