close()
- closes the connection on your socket descriptor
- This will prevent any more reads and writes to the socket. Anyone attempting to read or write the socket on the remote end will receive an error.
close(sockfd);
Parameters
sockfdis the socket file descriptor you want to close