Multi threading example for reverse DNS query 
Author Message
 Multi threading example for reverse DNS query

Hi,

Does anybody have an example of how to use multi threading to do a number of
reverse DNS queries at once?

I currently use:
string get_host_name(int ip)
{
  HOSTENT* h = gethostbyaddr(reinterpret_cast<const char*>(&ip), 4,
AF_INET);
 return h ? h->h_name : "";

Quote:
}

But it's not fast if you have a big number of IPs.

--

Olaf van der Spek
Almere, Holland

http://www.*-*-*.com/



Sat, 08 Feb 2003 03:00:00 GMT  
 Multi threading example for reverse DNS query
Sorry, I don't have an example, but you might want to consider completion
ports.



Quote:
> Hi,

> Does anybody have an example of how to use multi threading to do a number
of
> reverse DNS queries at once?

> I currently use:
> string get_host_name(int ip)
> {
>   HOSTENT* h = gethostbyaddr(reinterpret_cast<const char*>(&ip), 4,
> AF_INET);
>  return h ? h->h_name : "";
> }

> But it's not fast if you have a big number of IPs.

> --

> Olaf van der Spek
> Almere, Holland

> http://xcc.tiberian.com/



Sun, 09 Feb 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Resolve DNS name from IP address (reverse DNS lookup)

2. Resolve DNS name from IP address (reverse DNS lookup)

3. multi-threaded blues (book example)!!

4. Requesting multi-thread example

5. Reverse DNS lookup

6. Querying for DNS Records

7. RFC 1035, How to Query a DNS?

8. Query a DNS Server

9. Querying a DNS server for MX record

10. Multi-Threading, Multi-Functions, Real-Time, How?

11. Multi-thread, thread pool, or asynchronous socket

12. Help: Multi-thread, thread pool, or asynchronous socket

 

 
Powered by phpBB® Forum Software