Mediasoup 3.13.18 - TransportListenInfo

Hi,

with the new version TransportListenIp are depircated and TransportListenInfo should be used instead.
So when creating a transport I configure it using WebRtcTransportOptions and until now I only have passed TransportListenIp with ip and announcedIp set. Then using the WebRtcTransportOptions flags enableUdp and enableTcp I have decided what protocol should be used. Now in the TransportListenInfo there is a required field protocol, so I’m not sure should I now add 2 TransportListenInfo one for UDP one for TCP and do then the flags enableUdp and enableTcp in WebRtcTransportOptions have any meaning? It like I have to define if TCP/UDP 2 times.

Just pass 2 TransportListenInfos, one with UDP and the other with TCP, in your order or preference.

OK. So I always will pass both TCP and UDP in the prefered order and use enableUdp and enableTcp to enable or disable. And what about preferUdp and preferTcp flags, are they ignored and only the order of TransportListenInfo matters?

No, do not use enableXxx or preferXxx at all.

Got it, so I will not set enableUdp, enableTcp, preferUdp, preferTcp. However, this will cause that enableUdp will be true and the rest false, as these are the default values. But I gues as you write this is OK.

Nope. enableXxx and preferXxx options are completely ignored if listenInfos are used instead of listenIps.

Thanks!