i vote option nr.2 and a possible solution for that is:
1-create socket[sock_stream....];
2-fork()[inherits the socket descriptor];
-father[use to read];
-son[use to write];
you can implement to detect a client disconnection when read() from socket descriptor returns 0bytes