return utpSocketSocket{us, network}, err
}
+// utpSocket wrapper, additionally wrapped for the torrent package's socket interface.
type utpSocketSocket struct {
utpSocket
network string
}
+func (me utpSocketSocket) DialerNetwork() string {
+ return me.network
+}
+
func (me utpSocketSocket) Dial(ctx context.Context, addr string) (conn net.Conn, err error) {
defer perf.ScopeTimerErr(&err)()
return me.utpSocket.DialContext(ctx, me.network, addr)