title: dup2 a socket to a file
body: <p>All, winter comes, plz keep warm and keep healthy.
  During the meditation about the work, I got some question about the function of fd dup2
  .
  I create a socket server, and a client. the server send, the client receive data.
  But Now I want to dup2 the server socket fd to a file df in order to let the client read data directly from a file located in server.
  I write like </p>
  
  <pre>
  while(socketdf = accept(...))
  {
   dup2(filefd , socketfd);
  }
  </pre>
  
  <p>However, it doesnot work
  is this possible?
  Can you give me any advice on this?
  Thanx</p>