FedP2P/utp_libutp.go

17 lines
259 B
Go
Raw Normal View History

// +build cgo,!disable_libutp
2017-06-16 16:08:24 +08:00
package torrent
import (
"github.com/anacrolix/go-libutp"
)
func NewUtpSocket(network, addr string) (utpSocket, error) {
s, err := utp.NewSocket(network, addr)
if s == nil {
return nil, err
} else {
return s, err
}
2017-06-16 16:08:24 +08:00
}