To understand the concept of sockets
To learn how to send and receive data through sockets
To implement network clients and servers
To communicate with web servers and server-side applications through the Hypertext Transfer Protocol (HTTP)
You probably have quite a bit of experience with the Internet: the global network that links together millions of computers. In particular, you use the Internet whenever you browse the World Wide Web. Note that the Internet is not the same as the "Web". The World Wide Web is only one of many services offered over the Internet. E-mail, another popular service, also uses the Internet, but its implementation differs from that of the Web. In this chapter, you will see what goes on "under the hood" when you send an e-mail message or when you retrieve a web page from a remote server. You will also learn how to write your own programs that fetch data from sites across the Internet and how to write server programs that can serve information to other programs.
Computers can be connected with each other through a variety of physical media. In a computer lab, for example, computers are connected by network cabling. Electrical impulses representing information flow across the cables. If you use a DSL modem to connect your computer to the Internet, the signals travel across a regular telephone wire, encoded as tones. On a wireless network, signals are sent by transmitting a modulated radio frequency. ...