connect() socket API

Is there any relation between the connect() socket API and the TCP's Transmission Control Block.

Also how does connect detect that a socket is in use i.e., EADDRINUSE

It gets this error message from bind() because the socket cannot bind to the specified
port bcause the port is already in use or in the FIN-WAIT/CLOSE-WAIT state.