diff --git a/README.md b/README.md index 2acc8b6..4052a60 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ h, err := libp2p.New( ``` The example above will replace the default transports with a single TCP -transport. To add multiple tranports, use `ChainOptions`: +transport. To add multiple transports: ``` go // TCP and QUIC: @@ -79,6 +79,13 @@ h, err := libp2p.New( ) ``` +To use TCP transport options, pass them to the `libp2p.Transport` constructor: +```go +h, err := libp2p.New( + libp2p.Transport(tcp.NewTCPTransport, tcp.DisableReuseport(), tcp.WithConnectionTimeout(20*time.Second)) +) +``` + ## Addresses The TCP transport supports [multiaddrs][multiaddr] that contain a `tcp`