Home | History | Annotate | Download | only in net

Lines Matching refs:hints

60 	var hints C.struct_addrinfo
62 case "": // no hints
64 hints.ai_socktype = C.SOCK_STREAM
65 hints.ai_protocol = C.IPPROTO_TCP
67 hints.ai_socktype = C.SOCK_DGRAM
68 hints.ai_protocol = C.IPPROTO_UDP
75 hints.ai_family = C.AF_INET
77 hints.ai_family = C.AF_INET6
81 port, err := cgoLookupServicePort(&hints, network, service)
85 go cgoPortLookup(result, &hints, network, service)
96 func cgoLookupServicePort(hints *C.struct_addrinfo, network, service string) (port int, err error) {
104 gerrno, err := C.getaddrinfo(nil, (*C.char)(unsafe.Pointer(&cservice[0])), hints, &res)
133 func cgoPortLookup(result chan<- portLookupResult, hints *C.struct_addrinfo, network, service string) {
134 port, err := cgoLookupServicePort(hints, network, service)
142 var hints C.struct_addrinfo
143 hints.ai_flags = cgoAddrInfoFlags
144 hints.ai_socktype = C.SOCK_STREAM
149 gerrno, err := C.getaddrinfo((*C.char)(unsafe.Pointer(&h[0])), nil, &hints, &res)