Computer-Networks
August 29, 2024Computer-Networks
August 29, 2024Sockets
|
Question 2
|
Which of the following – client or server or both – does an active or passive open of
sockets?
sockets?
|
Both can do passive open
|
|
|
Both can do active open
|
|
|
Clients can do only passive open
|
|
|
Servers can do only passive open
|
Question 2 Explanation:
A passive open is the creation of a listening socket, to accept incoming connections. It uses socket(), bind(), listen(), followed by an accept() loop. An active open is the creation of a connection to a listening port by a client.
Hence servers can only do passive opens.
Hence servers can only do passive opens.
Correct Answer: D
Question 2 Explanation:
A passive open is the creation of a listening socket, to accept incoming connections. It uses socket(), bind(), listen(), followed by an accept() loop. An active open is the creation of a connection to a listening port by a client.
Hence servers can only do passive opens.
Hence servers can only do passive opens.
