Add an idle callback, to be used while waiting for activity.

The PR title says it all. I use this idle callback to do some processing while waiting for more data.
And I fail at reading the `&& $idleCallback` would catch that.