-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b203ad
commit 3e33512
Showing
4 changed files
with
31 additions
and
0 deletions.
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,14 @@ | ||
//go:build go1.21 | ||
// +build go1.21 | ||
|
||
package core | ||
|
||
import "net" | ||
|
||
func setMPTCPForDialer(d *net.Dialer) { | ||
d.SetMultipathTCP(true) | ||
} | ||
|
||
func setMPTCPForListener(lc *net.ListenConfig) { | ||
lc.SetMultipathTCP(true) | ||
} |
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,14 @@ | ||
//go:build !go1.21 | ||
// +build !go1.21 | ||
|
||
package core | ||
|
||
import "net" | ||
|
||
func setMPTCPForDialer(d *net.Dialer) { | ||
// Not supported on versions under Go 1.21 | ||
} | ||
|
||
func setMPTCPForListener(lc *net.ListenConfig) { | ||
// Not supported on versions under Go 1.21 | ||
} |
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