威海住房和城乡建设局官方网站,百度一下免费下载,西安月子中心网站制作,手机网站开发团队DTLS协议: DTLS(Datagram Transport Layer Security)数据包安全传输协议,用于在不可靠的数据包传输协议上(如UDP)提供数据的安全传输。 UDP多路复用: 一个UDP多路复用#xff0c;被用来处理共享同一个UDP端口的多个并发的UDT连接。类似同一个tcp port上创建多个socket connec…DTLS协议: DTLS(Datagram Transport Layer Security)数据包安全传输协议,用于在不可靠的数据包传输协议上(如UDP)提供数据的安全传输。 UDP多路复用: 一个UDP多路复用被用来处理共享同一个UDP端口的多个并发的UDT连接。类似同一个tcp port上创建多个socket connection. UDP多路复用根据包头的目标Socket ID将接收到的不同的UDT包分发给相应 的UDT Socket。 换言之多个UDT Socket绑定到不同的UDP端口时必然被各自的UDP多路复用 分发处理。 一个UDP多路复用维护两个队列发送队列和接收队列。 发送队列包含Socket信息的链表。链表节点的Socket必须包含至少一个计划发送的 信息包。Sockets按照下一个信息包发送的时间进行排序。 发送队列维护一个高性能的计时器。当队列的Socket包发送时间到时队列头部的 Socket的包被发送并且头部的Socket从队列中删除。如果头部Socket包含多个计划信 息包时该头部Socket将被重新插入到发送队列里。 接收队列读取输入的信息包并分发信息包到相应的UDT Socket。如果目标Socket ID 是0信息包将被分发给当前正在监听的Socket或者被分发给会合的连接 (Rendezvous connection)。 和发送队列相似接收队列也包含等待接收信息包的Socket信息链表。如果队列的任 意一个Socket的SYN间隔时间到时接收队列会检测该Socket的“任意一个定时器”(参 见定时器)是否期满。
ICE其实不算一个传输协议它更像是标识协议一般指Binding Request和Response会在里面带有IP和优先级信息来标识地址和信道的信息用于多条信道的选择比如4G和WiFi都很好时优先选谁。 还会用作会话的心跳客户端会一直发送这个消息。因此ICE对于负载均衡没有作用但是它可以用来标识会话和QUIC的ConnectionID作用类似因此在经过Load Balance时可以起到识别会话的作用特别是客户端的网络切换时。 而TURN协议其实是对Cloud Native非常不友好的协议因为它是需要分配一系列的端口用端口来区分用户这种是在私有网络中的做法假设端口无限而公有云上端口往往是受限的比如需要经过Load Balance这个系统时端口就是有限的。
mediasoup支持 * Multi-stream: multiple audio/video streams over a single ICE DTLS transport. * ICE / DTLS / RTP / RTCP over UDP and TCP.
从srs的配置文件可以更为清晰地看到udp端口复用规则。 ############################################################################################# # WebRTC server section ############################################################################################# rtc_server { # The udp listen port, we will reuse it for connections. # Overwrite by env SRS_RTC_SERVER_LISTEN # default: 8000 listen 8000; # For WebRTC over TCP directly, not TURN, see https://github.com/ossrs/srs/issues/2852 # Some network does not support UDP, or not very well, so we use TCP like HTTP/80 port for firewall traversing. tcp { # Whether enable WebRTC over TCP. # Overwrite by env SRS_RTC_SERVER_TCP_ENABLED # Default: off enabled off; # The TCP listen port for WebRTC. Highly recommend is some normally used ports, such as TCP/80, TCP/443, # TCP/8000, TCP/8080 etc. However SRS default to TCP/8000 corresponding to UDP/8000. # Overwrite by env SRS_RTC_SERVER_TCP_LISTEN # Default: 8000 listen 8000; } # The protocol for candidate to use, it can be: # udp Generate UDP candidates. Note that UDP server is always enabled for WebRTC. # tcp Generate TCP candidates. Fail if rtc_server.tcp(WebRTC over TCP) is disabled. # all Generate UDPTCP candidates. Ignore if rtc_server.tcp(WebRTC over TCP) is disabled. # Note that if both are connected, we will use the first connected(DTLS done) one. # Overwrite by env SRS_RTC_SERVER_PROTOCOL # Default: udp protocol udp; //缺省用udp作为webrtc transport # We listen multiple times at the same port, by REUSEPORT, to increase the UDP queue. # Note that you can set to 1 and increase the system UDP buffer size by net.core.rmem_max # and net.core.rmem_default or just increase this to get larger UDP recv and send buffer. # Overwrite by env SRS_RTC_SERVER_REUSEPORT # default: 1 reuseport 1; //启用udp端口复用。 } mediasoup对udp端口复用配置如下 webRtcTransport: { // listenIps: [LISTEN_IP], enableUdp: true, //配置为all(tcpudp) enableTcp: true, preferUdp: true, //default用udp preferTcp: false },