In an application that I'm working on, I'm using unix sockets to communicate between the client and the server.

The thing is, if connect() fails, do I need to call close() to release the socket descriptor? I guess the real question is, is close() the counterpart of socket() or the counterpart of connect()?