Before writing our first network program, let's learn about a great debugging tool for network programming that you already have, namely, telnet. Telnet is preinstalled on most systems (both UNIX and Windows). You should be able to launch it by typing telnet from a command shell.
You may have used telnet to connect to a remote computer, but you can use it to communicate with other services provided by Internet hosts as well. Here is an example of what you can do. Type
telnet time-A.timefreq.bldrdoc.gov 13
As Figure 3-1 shows, you should get back a line like this:
53221 04-08-04 02:19:40 50 0 0 513.0 UTC(NIST) *
What is going on? You have connected ...