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

Commit

Permalink
re-add NewTCPTransport method (#121)
Browse files Browse the repository at this point in the history
* re-add NewTCPTransport method

* release v0.6.1
  • Loading branch information
marten-seemann authored May 26, 2022
1 parent 29acff6 commit e144e11
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ module github.com/libp2p/go-tcp-transport

go 1.17

require github.com/libp2p/go-libp2p v0.20.0
require (
github.com/libp2p/go-libp2p v0.20.0
github.com/libp2p/go-libp2p-core v0.16.1
)

require (
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -18,7 +21,6 @@ require (
github.com/ipfs/go-log/v2 v2.5.1 // 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-netroute v0.2.0 // indirect
github.com/libp2p/go-openssl v0.0.7 // indirect
github.com/libp2p/go-reuseport v0.2.0 // indirect
Expand Down
10 changes: 10 additions & 0 deletions tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ package tcp
import (
"time"

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

"github.com/libp2p/go-libp2p/p2p/transport/tcp"
)

Expand All @@ -23,3 +26,10 @@ func WithConnectionTimeout(d time.Duration) Option {
// TcpTransport is the TCP transport.
// Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/tcp.TcpTransport instead.
type TcpTransport = tcp.TcpTransport

// NewTCPTransport creates a tcp transport object that tracks dialers and listeners
// created. It represents an entire TCP stack (though it might not necessarily be).
// Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/tcp.NewTCPTransport instead.
func NewTCPTransport(upgrader transport.Upgrader, rcmgr network.ResourceManager, opts ...Option) (*TcpTransport, error) {
return tcp.NewTCPTransport(upgrader, rcmgr, opts...)
}
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v0.6.0"
"version": "v0.6.1"
}

0 comments on commit e144e11

Please sign in to comment.