github.com/phuslu/fastdns@v0.8.3-0.20240310041952-69506fc67dd1/util_others.go (about) 1 // +build !linux 2 3 package fastdns 4 5 import ( 6 "errors" 7 "net" 8 ) 9 10 func listen(network, address string) (*net.UDPConn, error) { 11 laddr, err := net.ResolveUDPAddr(network, address) 12 if err != nil { 13 return nil, err 14 } 15 16 return net.ListenUDP(network, laddr) 17 } 18 19 func taskset(cpu int) error { 20 return errors.New("not implemented") 21 }