2
0
mirror of synced 2025-02-23 22:28:11 +00:00
torrent/utp_go.go
2021-07-14 14:35:52 +10:00

18 lines
307 B
Go

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