Protocol to move data between Web server and Web browser.
The Internet uses TCP/IP protocols. The Web uses sockets to communicate.
Socket: IP address + Port.
Each machine on the internet has an IP address (e.g., 126.96.36.199).
This IP address is augmented with another number called port. For example:
188.8.131.52:80 (port is 80).
- Server: a piece of software which perpetually "listens" to incoming
connections (requests) on the given port. E.g.: Web Server, FTP server, Mail
Server, SSHD server. Servers often operate on well known ports (< 1024).
- Client: a piece of software which is called by the user to connect to
some port/server. E.g.: Web browser, telnet command (client), ftp client.
Web server is an application, i.e., piece of software which performs some
specific function. Exchanges between Web server and Web browser have to be
done in a very specific format called HTTP (currently
version 1.1). There is a precisely defined format for
requests (i.e., stuff which browser sends to server), and responses
(i.e., stuff which server returns to a browser). Requests and reponses
consist of TOP LINE
(BODY is sometimes absent).
are separated by an empty line.