5. Selecting Networks and Addresses
So far we have avoided discussing network addresses and how applications can identify the correct ones to use. We have also avoided the issue of how applications select network devices. Instead of hard-coding networks and addresses, we have included them as function parameters and command-line arguments in the previous examples. This chapter will show how applications can select networks and addresses without hard-coding them, while at the same time relieving users from having to provide them explicitly.
Designing an application to work over only one network is an expensive proposition. Every time a new network or protocol is developed, the application would have to be modified for it to ...