Skip to content

Commit

Permalink
Merge pull request #1087 from ipfs/bitswap-perf
Browse files Browse the repository at this point in the history
increase window size for yamux streams
  • Loading branch information
jbenet committed Apr 17, 2015
2 parents 2406334 + 30ee01f commit a97e9e7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion p2p/net/swarm/swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ import (
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"
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"
context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
)

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
// be opened and closed, while still using the same Chan for all
Expand Down

0 comments on commit a97e9e7

Please sign in to comment.