]> Sergey Matveev's repositories - btrtrc.git/blobdiff - utp.go
Use DialContext instead of DialTimeout with utp
[btrtrc.git] / utp.go
diff --git a/utp.go b/utp.go
index ea9a6f7340b5b498efb7586ba70d3e53c576beb5..1d395e8068a719b03f980581b863f156135a2015 100644 (file)
--- a/utp.go
+++ b/utp.go
@@ -1,6 +1,7 @@
 package torrent
 
 import (
+       "context"
        "net"
        "time"
 )
@@ -17,6 +18,6 @@ type utpSocket interface {
        SetWriteDeadline(time.Time) error
        SetReadDeadline(time.Time) error
        WriteTo([]byte, net.Addr) (int, error)
-       DialTimeout(string, time.Duration) (net.Conn, error)
-       Dial(string) (net.Conn, error)
+       DialContext(ctx context.Context, addr string) (net.Conn, error)
+       Dial(addr string) (net.Conn, error)
 }