'clean(timeout = 0.05)
Removes all the buffered data from a tube by calling
:meth:`pwnlib.tubes.tube.tube.recv` with a low timeout until it fails.
If ``timeout`` is zero, only cached data will be cleared.
Note: If timeout is set to zero, the underlying network is
not actually polled; only the internal buffer is cleared.
Returns:
All data received
Examples:
>>> t = tube()
>>> t.unrecv(\'clean me up\')
>>> t.clean(0)
\'clean me up\'
>>> len(t.buffer)
0'

def clean(self, timeout=0.05):

    if (timeout == 0):
        return self.buffer.get()
    return self.recvrepeat(timeout)
