Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
36335e43
Commit
36335e43
authored
May 06, 2016
by
Jeromy Johnson
Browse files
Merge pull request #46 from ipfs/feat/override-mux-prefs
add env var for overriding muxer prefs
parents
0436764f
2d0c57e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
p2p/net/swarm/swarm.go
View file @
36335e43
...
@@ -5,6 +5,8 @@ package swarm
...
@@ -5,6 +5,8 @@ package swarm
import
(
import
(
"fmt"
"fmt"
"io/ioutil"
"io/ioutil"
"os"
"strings"
"sync"
"sync"
"time"
"time"
...
@@ -48,6 +50,11 @@ func init() {
...
@@ -48,6 +50,11 @@ func init() {
msstpt
.
AddTransport
(
"/yamux/1.0.0"
,
ymxtpt
)
msstpt
.
AddTransport
(
"/yamux/1.0.0"
,
ymxtpt
)
msstpt
.
AddTransport
(
"/spdy/3.1.0"
,
spdy
.
Transport
)
msstpt
.
AddTransport
(
"/spdy/3.1.0"
,
spdy
.
Transport
)
// allow overriding of muxer preferences
if
prefs
:=
os
.
Getenv
(
"LIBP2P_MUX_PREFS"
);
prefs
!=
""
{
msstpt
.
OrderPreference
=
strings
.
Fields
(
prefs
)
}
PSTransport
=
msstpt
PSTransport
=
msstpt
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment