6.2.3.11 close
The close
function is used to release the resources allocated to the
socket and, for a TCP stream socket, also terminate an open connection.
Each call to the socket
function must match with a call to
the close
function. In addition, sockets that are accepted on a server
socket port must be closed using this function.