Match the following terms and their definition Process Client process Server process Sockets 1. program running within a host 2. Process that initiates communication 3. process that waits to be contacted 4. Analogous to door; sending process shoves messages out door; sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process
Added by Jimmy B.
Close
Step 1
Step 1: **Process** is a program running within a host. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 59 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
In the scenario below, the left and right TCP clients communicate with a TCP server using TCP sockets. The Python code used to create a single welcoming socket in the server is shown in the figure (the welcoming socket itself is not shown graphically): code is also shown for the client sockets as well. The three sockets shown in the server were created as a result of the server accepting connection requests on this welcoming socket from the two clients (one connection from the client on the left, and two connections from the client on the right). mySocket = socket(AF_INET, SOCK_STREAM) mySocket.bind(myaddr, 6658) mySocket1 = socket(AF_INET, SOCK_STREAM) mySocket1.bind(myaddr, 6960) mySocket = socket(AF_INET, SOCK_STREAM) mySocket.bind(myaddr, 6038) mySocket2 = socket(AF_INET, SOCK_STREAM) mySocket2.bind(myaddr, 6555) P4 P5 P6 P1 P2 P3 network link physical network link physical 6 source port: ? dest port: ? uodaonos dest port: ? A source port: dest port: ? source port: dest port: ? Question List 1. What is the source port # for packet B? 2. What is the destination port # for packet B? 3. What is the source port # for packet D? 4. What is the destination port # for packet D? 5. What is the source port # for packet C? 6. What is the destination port # for packet C? 7. What is the source port # for packet A? 8. What is the destination port # for packet A?
Akash M.
PURPOSE Develop a practical understanding of task collaboration using socket programming, anonymous pipes, semaphores, and multithreading. OBJECTIVES Develop a client/server application using Linux TCP sockets and the C programming language. Your solution will respond to service requests by clients. Such requests may be by either providing the IP address of the server or the name of the host where the server is executing. PROBLEM You are to develop a data processing system to process strings of characters. The solution must replace all instances of lowercase vowels with uppercase ones and append to the last set of strings the sum of all numbers found. You are to design and implement a client/server application where the server will respond to different client requests by creating two dedicated new processes. One process will read from the socket, decode the received messages, and will create seven threads. The other process will encode the message processed by the threads and will write the resulting data to the socket. All communications between both the client and the server will be encoded according to the format defined in the project 3 format. IMPLEMENTATION DETAILS 1. You must develop a module that implements a queue of character strings. 2. This structure will be an array of pointers to strings with integers (pointers) to indicate the head and tail of the list. 3. The maximum size of the buffer array will be 10. 4. Threads should terminate when end of input data is reached.
IP Address: GHI P4 P5 P6 M1 M4 P1 Port: 1345 P7 Port: 2445 M2 M3 P2 Port: 1667 P3 Port: 1345 IP Address: ABC IP Address: JKL IP Address: DEF 1. Based on the image above, how would the socket tuples be defined for Messages 1-4? The image is representative of TCP-based multiplexing/demultiplexing. P4 is the Chrome browser, P5 is supporting the Domain Name System, and P6 is another window for the Chrome browser. The port numbers for the laptops' processes are given. 2. What are the differences in the tuples that define sockets for P4 (M1) and P6 (M3)? 3. What information would be required to define the socket for P2 if using UDP instead of TCP?
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD