status-go/vendor/github.com/anacrolix/torrent/utp_go.go

19 lines
349 B
Go
Raw Normal View History

2022-03-10 09:44:48 +00:00
//go:build !cgo || disable_libutp
// +build !cgo disable_libutp
package torrent
import (
"github.com/anacrolix/log"
"github.com/anacrolix/utp"
)
func NewUtpSocket(network, addr string, _ firewallCallback, _ log.Logger) (utpSocket, error) {
s, err := utp.NewSocket(network, addr)
if s == nil {
return nil, err
} else {
return s, err
}
}