img neowang


发表于2004/10/21 21:14:00  1631人阅读

Chapter 26 Client-Server Interaction

Focus on high-level services available on an internet and the application software that provides such services.


Protocol software does not have a mechanism analogous to a telephone bell – there is no way for protocol software to inform an application that communication has arrived, and no way for an application to agree to accept arbitrary incoming messages.


One application must actively initiate interaction, while the other application passively waits.

The application that actively initiates contact is called a client, while the application that passively waits for contact is called a server.


The term “server” refers to a program that waits passively for communication, and not to the computer on which it executes.


Information can flow in either or both directions between a client and server.


A client or server application interacts directly with a transport-layer protocol to establish communication and to send or receive information.


TCP uses 16-bit integer values known as protocol port numbers to identify services, and assigns a unique protocol port number to each services.


In fact, the server program is constructed in two parts: one that accepts requests and creates a new thread for the request, and another that consists of the code to handle an individual request.


On the server’s computer, TCP uses the combination of source and destination protocol port numbers (as well as client and server IP address) to identify a particular communication.

0 0


取 消