Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTcpMultiaddr ¶
func IsTcpMultiaddr(a ma.Multiaddr) bool
func IsUtpMultiaddr ¶
func IsUtpMultiaddr(a ma.Multiaddr) bool
func ReuseErrShouldRetry ¶
func ReuseErrShouldRetry(err error) bool
ReuseErrShouldRetry diagnoses whether to retry after a reuse error. if we failed to bind, we should retry. if bind worked and this is a real dial error (remote end didnt answer) then we should not retry.
func ReuseportIsAvailable ¶
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:
IPFS_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.
Types ¶
type Dialer ¶
type Dialer interface {
Dial(raddr ma.Multiaddr) (Conn, error)
Matches(ma.Multiaddr) bool
}
type Listener ¶
type Listener interface {
Accept() (Conn, error)
Close() error
Addr() net.Addr
Multiaddr() ma.Multiaddr
}
type TcpTransport ¶
type TcpTransport struct {
// contains filtered or unexported fields
}
func NewTCPTransport ¶
func NewTCPTransport() *TcpTransport
type TimeoutOpt ¶
type TimeoutOpt time.Duration
Click to show internal directories.
Click to hide internal directories.