Lines Matching refs:hostname

82     this.reject(dnsException(err, 'getaddrinfo', this.hostname));
95 this.reject(dnsException(err, 'getaddrinfo', this.hostname));
117 * Creates a promise that resolves with the IP address of the given hostname.
119 * @param {string} hostname - The hostname to resolve.
120 * @param {boolean} all - Whether to resolve with all IP addresses for the hostname.
123 * @param {boolean} verbatim - Whether to use the hostname verbatim.
124 * @returns {Promise<DNSLookupResult | DNSLookupResult[]>} The IP address(es) of the hostname.
129 function createLookupPromise(family, hostname, all, hints, verbatim) {
131 if (!hostname) {
132 emitInvalidHostnameWarning(hostname);
137 const matchedFamily = isIP(hostname);
140 const result = { address: hostname, family: matchedFamily };
148 req.hostname = hostname;
153 const err = getaddrinfo(req, hostname, family, hints, verbatim);
156 reject(dnsException(err, 'getaddrinfo', hostname));
159 hostname,
171 * Get the IP address for a given hostname.
172 * @param {string} hostname - The hostname to resolve (ex. 'nodejs.org').
181 function lookup(hostname, options) {
188 if (hostname) {
189 validateString(hostname, 'hostname');
217 return createLookupPromise(family, hostname, all, hints, verbatim);
221 function onlookupservice(err, hostname, service) {
227 this.resolve({ hostname, service });
229 stopPerf(this, kPerfHooksDnsLookupServiceContext, { detail: { hostname, service } });
233 function createLookupServicePromise(hostname, port) {
237 req.hostname = hostname;
243 const err = getnameinfo(req, hostname, port);
246 reject(dnsException(err, 'getnameinfo', hostname));
252 host: hostname,
275 this.reject(dnsException(err, this.bindingName, this.hostname));
289 function createResolverPromise(resolver, bindingName, hostname, ttl) {
294 req.hostname = hostname;
300 const err = resolver._handle[bindingName](req, hostname);
303 reject(dnsException(err, bindingName, hostname));
309 host: hostname,
329 function resolve(hostname, rrtype) {
343 return ReflectApply(resolver, this, [hostname]);