[WEBRTC] Forcing the use of TCP transport

Source: Internet
Author: User

Previous notes, finishing

WEBRTC uses UDP transport by default, but it can also be transmitted over TCP.

With TCP transport, servers such as Turnserver,licode,janus and servers are required.

1. If you use Turnserver, you only need the client to keep the relay&&tcp type of candidate, the others are discarded.

2. If you are using a server such as Licode,janus, TCP is not supported by default.

Because they are used at the bottom of the Libnice open-source Ice library, Libnice supports TCP in newer versions.

So you need to compile the new version of Libnice yourself, and then recompile the server

Refer to Libnice documentation https://nice.freedesktop.org/libnice/NiceAgent.html#NiceAgent--ice-tcp

3. Libnice new version also supports TCP heartbeat detection

0.1. 8 support keepalive-="keepalive-conncheck", KeepAlive, NULL );

The time-out is a bit long.

Maximum timeout time in time.h
Total_timeout = Initial_timeout * (2^ (max_retransmissions + 1)-1);
20s-80s around timeout nice_component_state_failed

[WEBRTC] Forcing the use of TCP transport

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.