Diagrammatically, the sequence of calls has the following shape:
Server Client socket socket <-- Creates server and client ends | | of the socket connection v | bind | <-- Identifies computer's address | | and socket's number v | listen | <-- Listens for client's approach | | socket connection *------------------* | | v *-------------- connect <-- Attempts connection | v accept <-- Accepts connection | *------------------* | | | | v v fdopen fdopen <-- Creates pointer variables for reading and/or writing