Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
deprecate this repo (#56)
Browse files Browse the repository at this point in the history
* deprecate this repo

* release v0.10.0
  • Loading branch information
marten-seemann committed May 25, 2022
1 parent ddc150b commit 6e00285
Show file tree
Hide file tree
Showing 8 changed files with 997 additions and 200 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# DEPRECATION NOTICE

This package has moved into go-libp2p as a sub-package, github.com/libp2p/go-libp2p/p2p/muxer/yamux.

# go-libp2p-yamux

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai)
Expand Down
44 changes: 0 additions & 44 deletions conn.go

This file was deleted.

36 changes: 17 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,33 @@ module github.com/libp2p/go-libp2p-yamux

go 1.17

require (
github.com/libp2p/go-libp2p-core v0.14.0
github.com/libp2p/go-libp2p-testing v0.9.2
github.com/libp2p/go-yamux/v3 v3.1.1
)
require github.com/libp2p/go-libp2p v0.20.0

require (
github.com/btcsuite/btcd v0.20.1-beta // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/ipfs/go-cid v0.0.7 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/btcsuite/btcd v0.22.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.1.3 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/ipfs/go-cid v0.1.0 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/libp2p/go-buffer-pool v0.0.2 // indirect
github.com/libp2p/go-libp2p-core v0.16.1 // indirect
github.com/libp2p/go-openssl v0.0.7 // indirect
github.com/libp2p/go-yamux/v3 v3.1.1 // indirect
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect
github.com/minio/sha256-simd v0.1.1 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.0.3 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/multiformats/go-multiaddr v0.4.1 // indirect
github.com/multiformats/go-multiaddr v0.5.0 // indirect
github.com/multiformats/go-multibase v0.0.3 // indirect
github.com/multiformats/go-multihash v0.0.14 // indirect
github.com/multiformats/go-multicodec v0.4.1 // indirect
github.com/multiformats/go-multihash v0.1.0 // indirect
github.com/multiformats/go-varint v0.0.6 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/stretchr/testify v1.7.0 // indirect
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect
lukechampine.com/blake3 v1.1.6 // indirect
)
981 changes: 969 additions & 12 deletions go.sum

Large diffs are not rendered by default.

64 changes: 0 additions & 64 deletions stream.go

This file was deleted.

51 changes: 6 additions & 45 deletions transport.go
Original file line number Diff line number Diff line change
@@ -1,53 +1,14 @@
// Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/p2p/muxer/yamux.
package sm_yamux

import (
"io/ioutil"
"math"
"net"

"github.com/libp2p/go-libp2p-core/network"

"github.com/libp2p/go-yamux/v3"
"github.com/libp2p/go-libp2p/p2p/muxer/yamux"
)

var DefaultTransport *Transport

func init() {
config := yamux.DefaultConfig()
// We've bumped this to 16MiB as this critically limits throughput.
//
// 1MiB means a best case of 10MiB/s (83.89Mbps) on a connection with
// 100ms latency. The default gave us 2.4MiB *best case* which was
// totally unacceptable.
config.MaxStreamWindowSize = uint32(16 * 1024 * 1024)
// don't spam
config.LogOutput = ioutil.Discard
// We always run over a security transport that buffers internally
// (i.e., uses a block cipher).
config.ReadBufSize = 0
// Effectively disable the incoming streams limit.
// This is now dynamically limited by the resource manager.
config.MaxIncomingStreams = math.MaxUint32
DefaultTransport = (*Transport)(config)
}
// Deprecated: use github.com/libp2p/go-libp2p/p2p/muxer/yamux.DefaultTransport instead.
var DefaultTransport = yamux.DefaultTransport

// Transport implements mux.Multiplexer that constructs
// yamux-backed muxed connections.
type Transport yamux.Config

var _ network.Multiplexer = &Transport{}

func (t *Transport) NewConn(nc net.Conn, isServer bool, scope network.PeerScope) (network.MuxedConn, error) {
var s *yamux.Session
var err error
if isServer {
s, err = yamux.Server(nc, t.Config(), scope)
} else {
s, err = yamux.Client(nc, t.Config(), scope)
}
return (*conn)(s), err
}

func (t *Transport) Config() *yamux.Config {
return (*yamux.Config)(t)
}
// Deprecated: use github.com/libp2p/go-libp2p/p2p/muxer/yamux.Transport instead.
type Transport = yamux.Transport
15 changes: 0 additions & 15 deletions transport_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v0.9.1"
"version": "v0.10.0"
}

0 comments on commit 6e00285

Please sign in to comment.