Client / server in one file using sockets and threads