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

Commit e144e11

Browse files
re-add NewTCPTransport method (#121)
* re-add NewTCPTransport method * release v0.6.1
1 parent 29acff6 commit e144e11

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ module github.com/libp2p/go-tcp-transport
22

33
go 1.17
44

5-
require github.com/libp2p/go-libp2p v0.20.0
5+
require (
6+
github.com/libp2p/go-libp2p v0.20.0
7+
github.com/libp2p/go-libp2p-core v0.16.1
8+
)
69

710
require (
811
github.com/beorn7/perks v1.0.1 // indirect
@@ -18,7 +21,6 @@ require (
1821
github.com/ipfs/go-log/v2 v2.5.1 // indirect
1922
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
2023
github.com/libp2p/go-buffer-pool v0.0.2 // indirect
21-
github.com/libp2p/go-libp2p-core v0.16.1 // indirect
2224
github.com/libp2p/go-netroute v0.2.0 // indirect
2325
github.com/libp2p/go-openssl v0.0.7 // indirect
2426
github.com/libp2p/go-reuseport v0.2.0 // indirect

tcp.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ package tcp
44
import (
55
"time"
66

7+
"github.com/libp2p/go-libp2p-core/network"
8+
"github.com/libp2p/go-libp2p-core/transport"
9+
710
"github.com/libp2p/go-libp2p/p2p/transport/tcp"
811
)
912

@@ -23,3 +26,10 @@ func WithConnectionTimeout(d time.Duration) Option {
2326
// TcpTransport is the TCP transport.
2427
// Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/tcp.TcpTransport instead.
2528
type TcpTransport = tcp.TcpTransport
29+
30+
// NewTCPTransport creates a tcp transport object that tracks dialers and listeners
31+
// created. It represents an entire TCP stack (though it might not necessarily be).
32+
// Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/tcp.NewTCPTransport instead.
33+
func NewTCPTransport(upgrader transport.Upgrader, rcmgr network.ResourceManager, opts ...Option) (*TcpTransport, error) {
34+
return tcp.NewTCPTransport(upgrader, rcmgr, opts...)
35+
}

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "v0.6.0"
2+
"version": "v0.6.1"
33
}

0 commit comments

Comments
 (0)