Skip to content

Commit

Permalink
rename the reuseport package to reuseport
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed May 20, 2022
1 parent 3b98536 commit 492ee92
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion p2p/net/reuseport/dial.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tcpreuse
package reuseport

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/reuseport/listen.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tcpreuse
package reuseport

import (
"net"
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/reuseport/multidialer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tcpreuse
package reuseport

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions p2p/net/reuseport/reuseport.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package tcpreuse
package reuseport

import (
"context"
"net"

reuseport "github.com/libp2p/go-reuseport"
"github.com/libp2p/go-reuseport"
)

var fallbackDialer net.Dialer
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/reuseport/reuseport_plan9.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tcpreuse
package reuseport

import (
"net"
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/reuseport/reuseport_posix.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//go:build !plan9
// +build !plan9

package tcpreuse
package reuseport

import (
"net"
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/reuseport/reuseport_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//go:build !plan9
// +build !plan9

package tcpreuse
package reuseport

import (
"net"
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/reuseport/singledialer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tcpreuse
package reuseport

import (
"context"
Expand Down
6 changes: 3 additions & 3 deletions p2p/net/reuseport/transport.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Package tcpreuse provides a basic transport for automatically (and intelligently) reusing TCP ports.
// Package reuseport provides a basic transport for automatically (and intelligently) reusing TCP ports.
//
// To use, construct a new Transport and configure listeners tr.Listen(...).
// When dialing (tr.Dial(...)), the transport will attempt to reuse the ports it's currently listening on,
// choosing the best one depending on the destination address.
//
// It is recommended to set set SO_LINGER to 0 for all connections, otherwise
// It is recommended to set SO_LINGER to 0 for all connections, otherwise
// reusing the port may fail when re-dialing a recently closed connection.
// See https://hea-www.harvard.edu/~fine/Tech/addrinuse.html for details.
package tcpreuse
package reuseport

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/reuseport/transport_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tcpreuse
package reuseport

import (
"net"
Expand Down
4 changes: 2 additions & 2 deletions p2p/transport/tcp/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"syscall"
"time"

rtpt "github.com/libp2p/go-libp2p/p2p/net/reuseport"
"github.com/libp2p/go-libp2p/p2p/net/reuseport"

"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
Expand Down Expand Up @@ -121,7 +121,7 @@ type TcpTransport struct {

rcmgr network.ResourceManager

reuse rtpt.Transport
reuse reuseport.Transport
}

var _ transport.Transport = &TcpTransport{}
Expand Down

0 comments on commit 492ee92

Please sign in to comment.