Non-blocking socket i/o with select()