Peek on the queue, blocking until timeout or data is received
the duration to wait. 0 for no waiting, -1 to wait forever
the data, or null if there was no data