Chapter 18. Internet Services
Introduction
This “telephone” has too many shortcomings to be seriously considered as a means of commmunication. The device is inherently of no value to us.
Correct use of sockets is only part of network communicating programs. 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:
Protocol |
Meaning |
Action |
---|---|---|
FTP |
File Transfer Protocol |
Copying files between remote machines |
telnet |
Remote login | |
rsh and rcp |
Remote shell and Remote copy |
Remote login and remote file copying |
NNTP |
Network News Transfer Protocol |
Reading and posting USENET news |
HTTP |
Hypertext Transfer Protocol |
Transferring documents on the Web |
SMTP |
Simple Mail Transfer Protocol |
Sending mail |
POP3 |
Post Office Protocol |
Reading mail |
Even something as relatively simple as connecting to a remote computer requires intricate negotiations between client and server and has numerous dynamically configurable options. 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, try to get demoted into a management position, or both.
Fortunately, CPAN has modules for these protocols. Most modules implement the client side of the protocol rather than the server side. ...
Get Perl Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.