COMPUTER NETWORKING

APPLICATION LAYER

SOCKET INTERFACE PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which socket function is responsible for freeing up the ports used by the socket?
A
socket open
B
socket send
C
socket bind
D
socket close
Explanation: 

Detailed explanation-1: -This function is used to close the socket and free the Socket-Desc. Socket-Desc is the socket descriptor representing the socket to be closed.

Detailed explanation-2: -Sockets in Action Two operations are available to terminate this communication: shutdown and close.

Detailed explanation-3: -Big difference between shutdown and close on a socket is the behavior when the socket is shared by other processes. A shutdown() affects all copies of the socket while close() affects only the file descriptor in one process.

There is 1 question to complete.