package tcp

Import Path
	github.com/libp2p/go-libp2p/p2p/transport/tcp (on go.dev)

Dependency Relation
	imports 22 packages, and imported by one package

Involved Source Files metrics.go metrics_linux.go tcp.go
Package-Level Type Names (total 4)
/* sort by: | */
( ContextDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) *crypto/tls.Dialer *golang.org/x/crypto/ssh.Client *golang.org/x/net/internal/socks.Dialer golang.org/x/net/proxy.ContextDialer (interface) *golang.org/x/net/proxy.PerHost *net.Dialer ContextDialer : golang.org/x/net/proxy.ContextDialer
DialerForAddr is a function that returns a dialer for a given address. Implementations must return either a ContextDialer or an error. It is invalid to return nil, nil. func WithDialerForAddr(d DialerForAddr) Option
func DisableReuseport() Option func WithConnectionTimeout(d time.Duration) Option func WithDialerForAddr(d DialerForAddr) Option func WithMetrics() Option func NewTCPTransport(upgrader transport.Upgrader, rcmgr network.ResourceManager, sharedTCP *tcpreuse.ConnMgr, opts ...Option) (*TcpTransport, error)
TcpTransport is the TCP transport. CanDial returns true if this transport believes it can dial the given multiaddr. Dial dials the peer at the remote address. (*TcpTransport) DialWithUpdates(ctx context.Context, raddr ma.Multiaddr, p peer.ID, updateChan chan<- transport.DialUpdate) (transport.CapableConn, error) Listen listens on the given multiaddr. Protocols returns the list of terminal protocols this transport can dial. Proxy always returns false for the TCP transport. (*TcpTransport) String() string UseReuseport returns true if reuseport is enabled and available. *TcpTransport : github.com/libp2p/go-libp2p/core/transport.DialUpdater *TcpTransport : github.com/libp2p/go-libp2p/core/transport.Transport *TcpTransport : expvar.Var *TcpTransport : fmt.Stringer func NewTCPTransport(upgrader transport.Upgrader, rcmgr network.ResourceManager, sharedTCP *tcpreuse.ConnMgr, opts ...Option) (*TcpTransport, error)
Package-Level Functions (total 5)
NewTCPTransport creates a tcp transport object that tracks dialers and listeners created.
WithDialerForAddr sets a custom dialer for the given address. If set, it will be the *ONLY* dialer used.
Package-Level Variables (only one)
Deprecated: Use tcpreuse.ReuseportIsAvailable