The sockfd parameter is just the socket file descriptor returned from the socket function. The addr parameter points at a sockaddr struct which contains the address of the socket you want to connect ...
Once we have a socket object and the ability to specify an address, we have to connect it to another socket to make a two-way communication channel. Data can be written and read at both sockets that ...