SocketTools .NET Edition

Whois Protocol

The Whois protocol class provides an interface for requesting information about an Internet domain name. When a domain name is registered, the organization that registers the domain must provide certain contact information along with technical information such as the primary name servers for that domain. The Whois protocol enables an application to query a server that provides that registration information. The Whois class provides an interface for requesting that information and returning it to the program so it can be displayed or processed.

Overview

Initialize
Initialize an instance of the class, loading the networking library and validating the development license. This method must be called before any properties are changed or any other methods in this class are called by the application.

Connect
Connect to the remote host, using either a host name or IP address. Once the connection has been established, the other methods in the class may be used to retrieve information from the server.

Search
This method submits a search keyword to the server. The keyword may specify a domain name, a user handle or a user mailbox, depending on the search type. Note that not all servers support all search types. For example, many servers no longer support searching for user information based on email addresses.

Read
Read the data returned by the server, storing it in a string variable or byte array that is specified by the caller. This will contain the information about the domain specified when the Search method was called. Note that the data returned will typically be text, however it may not follow the same end-of-line conventions as Windows. For example, if the server is a UNIX or Linux system, the end-of-line may be indicated by a single linefeed, rather than a carriage-return/linefeed pair. Your application will have to account for this if the data is being displayed as-is to a user.

Disconnect
Disconnect from the server and release the memory allocated for that client session. After this method is called, the client session is no longer valid.

Reset
Reset the internal state of the component. This can be useful if your application wishes to discard any settings made by a user and return that instance of the class to its default state.

Uninitialize
Unload the networking library and release any resources that have been allocated for the current process. This is the last method call that the application should make prior to terminating. This is only necessary if the application has previously called the Initialize method.