Ask Question

the UDP server described needed only one socket, whereas the TCP server needed two sockets. Why? If the TCP server were to support n simultaneous connections, each from a different client host, how many sockets would the TCP server need?

+4
Answers (2)
  1. 27 March, 08:53
    0
    UDP uses one socket and TCP requires two sockets in a transmission because UDP is a way one connectionless protocol but TCP is connection oriented.

    The TCP server that supports n simultaneous connections would require n sockets, ranging from 1 through n.

    Explanation:

    A socket is a fusion of a port number and a source IP address using a colon.

    UDP is a transport layer protocol that is unreliable, because it does not need to establish connection to transmit packets and does not retransmit dropped packets. TCP is another transport layer protocol that is reliable, establish connection and retransmit dropped packets.

    For a UDP, only one socket would be created to transmission. A socket on the client side and server side would be created in TCP connection. A server can have multiple sockets for one or different transmission protocols.
  2. 27 March, 09:10
    0
    The UDP server described needed only one socket, whereas the TCP server needed two sockets because:

    With the UDP server, there is no welcoming socket, and all data from different clients enters the server through this one socket. With the TCP server, there is a welcoming socket, and each time a client initiates a connection to the server, a new socket is created. Thus, to support n simultaneous connections, the server would need n+1 sockets.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “the UDP server described needed only one socket, whereas the TCP server needed two sockets. Why? If the TCP server were to support n ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers