Once the socket is established by the server, a client program can connect itself to that socket, thereby enabling two-way communication:
Server program Client program *---------------------* *---------------------* | | Socket | | | *-- | | | -----------------* | | <-------------------------------- | | --------------------------------> | | -----------------* | | *-- Connection | | | Statements in here | | Statements in here | | create and name a | | try to connect to | | socket to which a | | a socket already | | client can connect | | created and named | | | | by a server | *---------------------* *---------------------*