mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-03 04:37:30 +08:00
Merge pull request #1087 from ipfs/bitswap-perf
increase window size for yamux streams
This commit is contained in:
@ -16,13 +16,20 @@ import (
|
|||||||
ctxgroup "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-ctxgroup"
|
ctxgroup "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-ctxgroup"
|
||||||
ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
|
ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
|
||||||
ps "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-peerstream"
|
ps "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-peerstream"
|
||||||
|
pst "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-peerstream/transport"
|
||||||
psy "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-peerstream/transport/yamux"
|
psy "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-peerstream/transport/yamux"
|
||||||
context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
|
context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = eventlog.Logger("swarm2")
|
var log = eventlog.Logger("swarm2")
|
||||||
|
|
||||||
var PSTransport = psy.DefaultTransport
|
var PSTransport pst.Transport
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
tpt := *psy.DefaultTransport
|
||||||
|
tpt.MaxStreamWindowSize = 512 * 1024
|
||||||
|
PSTransport = &tpt
|
||||||
|
}
|
||||||
|
|
||||||
// Swarm is a connection muxer, allowing connections to other peers to
|
// Swarm is a connection muxer, allowing connections to other peers to
|
||||||
// be opened and closed, while still using the same Chan for all
|
// be opened and closed, while still using the same Chan for all
|
||||||
|
Reference in New Issue
Block a user