When I do this in perl I track with a hash. Add new entry after accept. Store peer info as a key.<br>
<br>
$client->{peer}{peer} =peer<br>
$client->{peer}{fd} = fd<br>
<br>
Place that fd into the select. Set select timeout short and process queue on TO. Do have logic to force process if select does not TO due to traffic. I got bit by that mistake.<br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.