signalapp / Signal-iOS

A private messenger for iOS.
https://signal.org
GNU Affero General Public License v3.0
10.77k stars 3.02k forks source link

Add Multipath TCP (MPTCP) support #5848

Open Aperence opened 1 month ago

Aperence commented 1 month ago

First time contributor checklist

Contributor checklist

Description

MPTCP is a TCP extension allowing to improve network reliabilty by using mutiple network interface for the same TCP connection. Check https://www.mptcp.dev and https://developer.apple.com/documentation/foundation/urlsessionconfiguration/improving_network_reliability_using_multipath_tcp for details. Changes to this repository consists in setting the multipathServiceType of URLSessionConfiguration to Handover, allowing a seamless transition of interface in case of deterioration of the connection.

211217613 commented 1 month ago

Would this help with call quality when moving away from WiFi to cellular data?

Whenever I move from WiFi access to cellular data i always get a "signal reconnecting" message.

Aperence commented 1 month ago

As long as the calls use an URLSession with the MultipathServiceType set to Handover mode (which is the suggested changes here), yes there should be an automatic transition to the cellular interface if the Wi-Fi connection becomes poor. The user won’t even notice that the application changed of interface (so there shouldn’t be anymore a message like the connection was lost if you have cellular access).

Note however that it requires server support, so in the end it will also depend about wether the server support mptcp or not (it is suggested to enable it on server side also by default https://www.mptcp.dev/faq.html#why--when-should-mptcp-be-enabled-by-default)