There are two kind of whois:
Domain whois
Each domain has information about its owner, technical contact, billing contact.
The data is kept at hierarchical Whois servers.
Let's suppose I want to whois komodia.com:
I will whois is to the COM's extension: whois.crsnic.net (port 43)
It will give me an answer pointing me to the actual whois server (which is whois.opensrs.net) (see picture)
The application will connected to whois.opensrs.net and query for komodia.com.
It will give a definite answer (see picture)
IP whois
There are three registries that hold all information regarding the owners of an IP (whois.arin.net, whois.apnic.net, whois.ripe.net)
When we want to check an IP, unless we know exactly which server holds the information we will have to contact them all, and see who will answer. (see picture of a IP lookup of my server's IP (64.127.67.124))
Implementation
Whois is implemented with class CWhoisSocket, and is demonstrated with sample: KomodiaWhois.
Pictures


