Communication Using TCPNow we discuss connection-oriented, concurrent  dịch - Communication Using TCPNow we discuss connection-oriented, concurrent  Việt làm thế nào để nói

Communication Using TCPNow we discu

Communication Using TCP
Now we discuss connection-oriented, concurrent communication using the service of TCP (the case of SCTP would be similar). Figure 17.11 shows the general flow diagram for this type of communication.
Server Process
The server process starts first. It calls the socket function to create a socket, which we call the listen socket. This socket is only used during connection establishment. The server process then calls the bind function to bind this connection to the socket address of the server computer. The server program then calls the accept function. This function is a blocking function; when it is called, it is blocked until the TCP receives a connection request (SYN segment) from a client. The accept function then is unblocked and creates a new socket called the connect socket that includes the socket address of the client that sent the SYN segment. After the accept function is unblocked, the server knows that a client needs its service. To provide concurrency, the server process (parent process) calls the fork function. This function creates a new process (child process), which is exactly the same as the parent process. After calling the fork function, the two processes are running concurrently, but each can do different things. Each process now has two sockets: listen and connect sockets. The parent process entrusts the duty of serving the client to the hand of the child process and calls the accept function again to wait for another client to request connection. The child process is now ready to serve the client. It first closes the listen socket and calls the recv function to receive data from the client. The recv function, like the recvfrom function, is a blocking function; it is blocked until a segment arrives. The child process uses a loop and calls the recv function repeatedly until it receives all segments sent by the client. The child process then gives the whole data to a function (we call it handleRequest), to handle the request and return the result. The result is then sent to the client in one single call to the send function. We need to emphasize several points here. First, the flow diagram we are using
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
Thông tin liên lạc bằng cách sử dụng TCPBây giờ, chúng tôi thảo luận về thông tin liên lạc kết nối theo định hướng, đồng thời sử dụng dịch vụ của TCP (trường hợp của SCTP sẽ là tương tự). Con số 17,11 cho thấy sơ đồ dòng chảy chung của loại giao tiếp.Máy chủ quá trìnhThe server process starts first. It calls the socket function to create a socket, which we call the listen socket. This socket is only used during connection establishment. The server process then calls the bind function to bind this connection to the socket address of the server computer. The server program then calls the accept function. This function is a blocking function; when it is called, it is blocked until the TCP receives a connection request (SYN segment) from a client. The accept function then is unblocked and creates a new socket called the connect socket that includes the socket address of the client that sent the SYN segment. After the accept function is unblocked, the server knows that a client needs its service. To provide concurrency, the server process (parent process) calls the fork function. This function creates a new process (child process), which is exactly the same as the parent process. After calling the fork function, the two processes are running concurrently, but each can do different things. Each process now has two sockets: listen and connect sockets. The parent process entrusts the duty of serving the client to the hand of the child process and calls the accept function again to wait for another client to request connection. The child process is now ready to serve the client. It first closes the listen socket and calls the recv function to receive data from the client. The recv function, like the recvfrom function, is a blocking function; it is blocked until a segment arrives. The child process uses a loop and calls the recv function repeatedly until it receives all segments sent by the client. The child process then gives the whole data to a function (we call it handleRequest), to handle the request and return the result. The result is then sent to the client in one single call to the send function. We need to emphasize several points here. First, the flow diagram we are using
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
Truyền thông Sử dụng TCP
Bây giờ chúng ta thảo luận theo hướng kết nối, giao tiếp đồng thời sử dụng các dịch vụ của TCP (trường hợp của SCTP ​​sẽ tương tự). Hình 17.11 cho thấy sơ đồ dòng chảy chung cho loại hình truyền thông này.
Process Server
Quá trình khởi động máy chủ đầu tiên. Nó gọi hàm socket để tạo một socket, mà chúng ta gọi là socket lắng nghe. Ổ cắm này chỉ được sử dụng trong quá trình thiết lập kết nối. Các quá trình máy chủ sau đó gọi hàm bind để ràng buộc kết nối này đến địa chỉ socket của máy tính server. Chương trình máy chủ sau đó gọi hàm chấp nhận. Chức năng này là một chức năng ngăn chặn; khi nó được gọi, nó sẽ bị khóa cho đến khi TCP nhận được một yêu cầu kết nối (đoạn SYN) từ một khách hàng. Việc chấp nhận chức năng sau đó là cấm và tạo ra một socket mới gọi là ổ cắm kết nối bao gồm các địa chỉ socket của client gửi các đoạn SYN. Sau khi các chức năng chấp nhận là cấm, các máy chủ biết rằng một khách hàng cần dịch vụ của mình. Để cung cấp đồng thời, quá trình máy chủ (quá trình cha mẹ) gọi hàm fork. Chức năng này tạo ra một quy trình mới (quá trình con), mà là chính xác giống như quá trình cha mẹ. Sau khi gọi chức năng ngã ba, hai quá trình đang chạy đồng thời, nhưng mỗi người có thể làm những việc khác nhau. Mỗi tiến trình hiện có hai ổ cắm: lắng nghe và kết nối ổ cắm. Quá trình cha mẹ giao phó nhiệm vụ phục vụ khách hàng đến tay các quá trình con và kêu gọi các chức năng chấp nhận một lần nữa để chờ đợi cho một khách hàng để kết nối yêu cầu. Quá trình nuôi con bây giờ đã sẵn sàng để phục vụ khách hàng. Nó đầu tiên đóng nghe ổ cắm và gọi hàm recv để nhận dữ liệu từ khách hàng. Các chức năng recv, giống như chức năng recvfrom, là một chức năng ngăn chặn; nó bị chặn cho đến khi một đoạn đến. Quá trình con sử dụng một vòng lặp và gọi hàm recv nhiều lần cho đến khi nó nhận được tất cả các phân khúc gửi của khách hàng. Quá trình con sau đó cung cấp cho toàn bộ dữ liệu đến một chức năng (chúng tôi gọi nó là handleRequest), để xử lý các yêu cầu và trả kết quả. Kết quả sau đó được gửi cho khách hàng trong một cuộc gọi duy nhất cho chức năng gửi. Chúng tôi cần phải nhấn mạnh một số điểm ở đây. Đầu tiên, các sơ đồ dòng chảy, chúng tôi đang sử dụng
đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2025 I Love Translation. All reserved.

E-mail: