First, compile the executable programs docserve, adddocs, and getdoc.
NOTE: Complete code for the examples in this chapter is located in the examples directory created for your installation of Tools.h++ Professional. The "Examples" chapter in Part V, "Resources," describes the location of that directory, or you can check the online build guide for your installation media.
Once the programs are built, start up the server by running docserve. Start the server in its own window so that you can see the output as it runs.
Now run the program adddocs. This connects to the server and adds the Reptile and CircleOfLife webs to the collection. You can supply an optional parameter indicating which address to connect to. For example, to connect to Rogue Wave's document server, use adddocs net.roguewave.com:7932. You will see output in the server window indicating what is happening.
Run getdoc ReptileWeb. It connects to the collection server, requests the web corresponding to the string "ReptileWeb," and prints the web links. An optional third parameter indicates the server's address. You should see output like this:
Reptiles -> Frog,Salamander Frog -> Slime Salamander -> Slime Slime ->
Finally, run getdoc CircleOfLife. This does the same thing, except that it requests the Web corresponding to "CircleOfLife." You should see:
Lion -> Antelope Antelope -> Grass Grass -> Dirt Dirt -> Carcass Carcass -> Lion
Now let's see how we made this happen.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.