Documentation
¶
Overview ¶
Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/p2p/transport/tcp.
Index ¶
- func ReuseportIsAvailable() booldeprecated
- type Optiondeprecated
- func DisableReuseport() Optiondeprecated
- func WithConnectionTimeout(d time.Duration) Optiondeprecated
- type TcpTransport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReuseportIsAvailable
deprecated
func ReuseportIsAvailable() bool
ReuseportIsAvailable returns whether reuseport is available to be used. This is here because we want to be able to turn reuseport on and off selectively. For now we use an ENV variable, as this handles our pressing need:
LIBP2P_TCP_REUSEPORT=false ipfs daemon
If this becomes a sought after feature, we could add this to the config. In the end, reuseport is a stop-gap.
Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/tcp.ReuseportIsAvailable instead.
Types ¶
type Option
deprecated
added in
v0.4.0
Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/tcp.Option instead.
func DisableReuseport
deprecated
added in
v0.4.0
func DisableReuseport() Option
Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/tcp.DisableReuseport instead.
func WithConnectionTimeout
deprecated
added in
v0.4.0
type TcpTransport ¶
type TcpTransport = tcp.TcpTransport
TcpTransport is the TCP transport. Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/tcp.TcpTransport instead.
func NewTCPTransport ¶
func NewTCPTransport(upgrader transport.Upgrader, rcmgr network.ResourceManager, opts ...Option) (*TcpTransport, error)
NewTCPTransport creates a tcp transport object that tracks dialers and listeners created. It represents an entire TCP stack (though it might not necessarily be). Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/tcp.NewTCPTransport instead.