Blocks until data becomes available for read.
abstract bool waitForData(
.time .Duration timeout = max()
|timeout|| Optional timeout, the default value of |
The function will return
true if data becomes available before the
timeout is reached. If the connection gets closed, or the timeout
false is returned instead.