# The Protocol Class

Libwww comes with a wide set of protocol modules that gives access to most popular Internet protocols including HTTP, FTP, Gopher, telnet, rlogin, NNTP and WAIS. However, as mentioned in the beginning, when the Library is first initialized it knows nothing about how to access the Internet. In fact it doesn't even know how to access the local file system. It is for the application to tell the Library what it can handle and where to go find the functionality. This is very much the same mechanism as we saw described in the previous chapter, so a lot of what is going on will hopefully become clear as we go along.

All protocol modules are dynamically bound to an access scheme. Take for example the following URL:

    	http://www.w3.org/

It has the access scheme http and if we have a protocol module capable of handling HTTP then we can make the binding between http and this module. As mentioned in the introduction to this chapter, the Library already comes with a large set of protocol module, including HTTP so all we have to do in this case is to register the HTTP module to the Library as being capable of handling http URLs.

One special case is the support for access to WAIS databases. WAIS has its own code Library called freeWAIS which is required in order to directly access wais URLs. We shall not describe in describe in detail here how this can be enabled as it is described in the the WWW-WAIS gateway.

Constructors, Destructors and Methods