title: Starting new file descriptor using select and accept
body: <p>Scenario: when select detect activity in one socket then below criteria happens in my code.
  <br/></p>
  
  <p>pseudo code:</p>
  
  <pre><code>after select i am checking in
  if stdin f descriptor
      do something
  
  else if listening file descriptor
  newFDescriptor = accept sockFDescriptor, (struct sockaddr *) &amp;clientAddress, &amp;clientAddressSize
  
  FD_SET (new file descriptor)
  send connected response to peer
  
  // data from connected peer
  else {
      receive data
  }
  </code></pre>
  
  <p>But every time i send something from a peer to other it creates new connection with new filedescriptor. i.e. it doesn't recogonize data in already created filedescriptor for this peer. 
  peer 1 to peer 2 (new file descriptor created)
  peer 1 to peer 2 (again new connection)
  It is receiving all data on the listening file descriptor.</p>