Which of the following is not a method that would be used by the client in a socket connection? Group of answer choices connect() getblocking() setblocking() listen()
Added by Erin I.
Step 1
The question is about methods used in a socket connection, specifically distinguishing between methods used by the client and the server. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 57 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.
Match the following attribute to the appropriate TCP or UDP protocol. High overhead Connection-oriented Segment retransmission and flow control through windowing Connectionless No retransmission or windowing Unreliable TCP UDP
(5 points) Suppose a web server has 1000 ongoing TCP connections. How many server-side sockets are used? How many server-side port numbers are used? Briefly (two sentences at most each) explain your answer.
Madhur L.
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