示例#1
0
文件: xfrprx.go 项目: elazarl/godns
func listen(tcp string, addr string, e chan os.Error) {
	switch tcp {
	case "tcp":
		err := dns.ListenAndServeTCP(addr, handle)
		e <- err
	case "udp":
		err := dns.ListenAndServeUDP(addr, handle)
		e <- err
	}
}
示例#2
0
文件: reflect.go 项目: elazarl/godns
func udp(addr string, e chan os.Error) {
	err := dns.ListenAndServeUDP(addr, handle)
	e <- err
	return
}