Fetch the repository succeeded.
This action will force synchronization from Gitee 极速下载/go-torrent, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
package torrent
import (
"context"
"net"
)
// Dialers have the network locked in.
type Dialer interface {
Dial(_ context.Context, addr string) (net.Conn, error)
DialerNetwork() string
}
// An interface to ease wrapping dialers that explicitly include a network parameter.
type DialContexter interface {
DialContext(ctx context.Context, network, addr string) (net.Conn, error)
}
// Used by wrappers of standard library network types.
var DefaultNetDialer = &net.Dialer{}
// Adapts a DialContexter to the Dial interface in this package.
type NetworkDialer struct {
Network string
Dialer DialContexter
}
func (me NetworkDialer) DialerNetwork() string {
return me.Network
}
func (me NetworkDialer) Dial(ctx context.Context, addr string) (_ net.Conn, err error) {
return me.Dialer.DialContext(ctx, me.Network, addr)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。