YTSFlix_Go/vendor/github.com/anacrolix/torrent/utp.go

19 lines
440 B
Go
Raw Normal View History

2018-11-04 14:58:15 +00:00
package torrent
import (
"context"
"net"
)
// Abstracts the utp Socket, so the implementation can be selected from
// different packages.
type utpSocket interface {
net.PacketConn
// net.Listener, but we can't have duplicate Close.
Accept() (net.Conn, error)
Addr() net.Addr
// net.Dialer but there's no interface.
DialContext(ctx context.Context, network, addr string) (net.Conn, error)
// Dial(addr string) (net.Conn, error)
}