December 2000
Intermediate to advanced
784 pages
20h 54m
English
To put this information into context, we'll now write a client for the daytime service. This service, which runs on many UNIX hosts, listens for incoming connections on TCP port 13. When it sees such a connection, it outputs a single line of text with the current time and date.
The script gets the dotted IP address of the daytime server from the command line. When we run it on 64.7.3.43, which is the IP address of the wuarchive.wustl.edu software archive, we get output like this:
% daytime_cli.pl 64.7.3.43
Sat Jan 6 19:11:22 2001
Figure 3.4 shows the code for the daytime client.
Read now
Unlock full access