This package provides a basic transport for automatically (and intelligently) reusing TCP ports.
To use, construct a new `Transport` (the zero value is safe to use) and configure any listeners (`tr.Listen(...)`).
Then, 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.
NOTE: Currently, we don't make any attempts to prevent two reusport transports from interfering with each other (reusing each other's ports). However, we reserve the right to fix this in the future.
## Install
`go-reuseport-transport` is a standard Go module which can be installed with:
This package is *currently* used by the [go-tcp-transport](https://github.com/libp2p/go-tcp-transport) libp2p transport and will likely be used by more libp2p transports in the future.
## Contribute
Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-reuseport-transport/issues)!