Lines Matching defs:host
161 Local<Array> HostentToNames(Environment* env, struct hostent* host) {
166 for (uint32_t i = 0; host->h_aliases[i] != nullptr; ++i)
167 names.emplace_back(OneByteString(env->isolate(), host->h_aliases[i]));
175 struct hostent* host,
179 for (uint32_t i = 0; host->h_aliases[i] != nullptr; ++i) {
183 OneByteString(env->isolate(), host->h_aliases[i])).Check();
210 hostent* host;
219 &host,
226 &host,
231 status = ares_parse_ns_reply(buf, len, &host);
234 status = ares_parse_ptr_reply(buf, len, nullptr, 0, AF_INET, &host);
243 CHECK_NOT_NULL(host);
244 HostEntPointer ptr(host);
303 OneByteString(env->isolate(), current->host)).Check();
438 OneByteString(env->isolate(), current->host)).Check();
1393 struct hostent* host = response->host.get();
1398 wrap->CallOnComplete(HostentToNames(env, host));
1854 inline void safe_free_hostent(struct hostent* host) {
1857 if (host->h_addr_list != nullptr) {
1859 while (host->h_addr_list[idx]) {
1860 free(host->h_addr_list[idx++]);
1862 free(host->h_addr_list);
1863 host->h_addr_list = nullptr;
1866 if (host->h_aliases != nullptr) {
1868 while (host->h_aliases[idx]) {
1869 free(host->h_aliases[idx++]);
1871 free(host->h_aliases);
1872 host->h_aliases = nullptr;
1875 free(host->h_name);
1876 free(host);