forked from curl/curl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
functional option MPTCP with --mptcp
- Loading branch information
1 parent
fd1260d
commit 9fadd6f
Showing
17 changed files
with
156 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
c: Copyright (C) Dorian Craps, <dorian.craps@student.vinci.be> | ||
SPDX-License-Identifier: curl | ||
Long: mptcp | ||
Added: 8.7.0 | ||
Help: Enable Multipath TCP (MPTCP) | ||
Category: connection | ||
Multi: boolean | ||
See-also: | ||
- tcp-fastopen | ||
Example: | ||
- --mptcp $URL | ||
--- | ||
|
||
# `--mptcp` | ||
|
||
Enables the use of Multipath TCP (MPTCP) for connections. MPTCP is an extension | ||
to the standard TCP that allows multiple TCP streams over different network | ||
paths between the same source and destination. This can enhance bandwidth and | ||
improve reliability by using multiple paths simultaneously. | ||
|
||
MPTCP is beneficial in networks where multiple paths exist between clients and | ||
servers, such as mobile networks where a device may switch between Wi-Fi and | ||
cellular data or in wired networks with multiple ISPs. | ||
|
||
## Usage | ||
|
||
To use MPTCP for your connections, add the `--mptcp` option when using `curl`: | ||
|
||
## Requirements | ||
|
||
- Your operating system must support MPTCP, and it must be enabled. | ||
- The server you are connecting to must also support MPTCP. | ||
|
||
## Availability | ||
|
||
The `--mptcp` option is available starting from `curl` version 8.6.1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
c: Copyright (C) Dorian Craps, <dorian.craps@student.vinci.be> | ||
SPDX-License-Identifier: curl | ||
Title: CURLOPT_MPTCP | ||
Section: 3 | ||
Source: libcurl | ||
See-also: | ||
- tcp-fastopen (3) | ||
--- | ||
|
||
# NAME | ||
|
||
CURLOPT_MPTCP - enable Multipath TCP | ||
|
||
# SYNOPSIS | ||
|
||
~~~c | ||
|
||
#include <curl/curl.h> | ||
|
||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MPTCP, long enable); | ||
~~~ | ||
# DESCRIPTION | ||
Pass a long as parameter set to 1L to enable or 0 to disable. | ||
Multipath TCP (MPTCP) is an extension of TCP that allows multiple paths | ||
to be used simultaneously by a single TCP connection, enhancing redundancy, | ||
bandwidth, and potentially reducing latency. | ||
It works by presenting a standard TCP interface to applications while | ||
managing multiple underlying TCP connections. | ||
Enabling MPTCP can improve the performance and reliability of network requests, | ||
particularly in environments where multiple network paths (e.g., WiFi and | ||
cellular) are available. | ||
Note: MPTCP support depends on the underlying operating system and network | ||
infrastructure. Not all networks support MPTCP, and its effectiveness will | ||
vary based on the network configuration and conditions. | ||
# DEFAULT | ||
0 | ||
# PROTOCOLS | ||
All | ||
# EXAMPLE | ||
~~~c | ||
int main(void) | ||
{ | ||
CURL *curl = curl_easy_init(); | ||
if(curl) { | ||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); | ||
curl_easy_setopt(curl, CURLOPT_MPTCP, 1L); | ||
curl_easy_perform(curl); | ||
} | ||
} | ||
~~~ | ||
|
||
# AVAILABILITY | ||
|
||
Support for MPTCP in libcurl requires Linux 5.6 or later. | ||
The feature's availability in libcurl can also depend | ||
on the version of libcurl. Added in 8.7.0. | ||
|
||
# RETURN VALUE | ||
|
||
Returns CURLE_OK if MPTCP is successfully enabled for the connection, | ||
otherwise returns an error code specific to the reason it could not be enabled, | ||
which might include lack of operating system support or libcurl not being built | ||
with MPTCP support. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters