1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.

Wednesday, April 22, 2009

How to do Closing a socket.

When we want to abort a connection, or to close a socket that is no longer needed, we can use the close() system call. it is defined simply as:

int close(int socket);

* socket - The socket that we wish to close. If it is associated with an open connection, the connection will be closed.

 
# #