Chapter 18. Internet Services
This “telephone” has too many shortcomings to be seriously considered as a means of communication. The device is inherently of no value to us.
Correct use of sockets is only part of writing programs that communicate over the network. Once you have a way for two programs to talk, you still need a protocol for communication. This protocol lets each party know when to talk, and it precisely defines who is responsible for which part of the service.
Common Internet protocols are listed in Table 18-1.
File Transfer Protocol
Copying files between remote machines
rsh and rcp
Remote shell and Remote copy
Remote login and remote file copying
Network News Transfer Protocol
Reading and posting USENET news
Hypertext Transfer Protocol
Transferring documents on the Web
Simple Mail Transfer Protocol
Post Office Protocol
Even something as relatively simple as connecting to a remote computer requires intricate negotiations between client and server. If you had to write the Perl code to implement these protocols each time you wanted to use a network service, you’d probably end up writing a lot of buggy programs, trying to get demoted into a management position, or both.
Fortunately, Perl has modules for these protocols. Most modules implement the client side of the protocol rather than the server side. This is because ...