Ask Question
4 August, 08:28

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?

+1
Answers (2)
  1. 4 August, 09:28
    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.
  2. 4 August, 11:55
    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.
Know the Answer?
Not Sure About the Answer?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers