'Implement the file socket interface.
Arguments:
block   -- Indicate if the read should block until a
value is ready.
timeout -- Time in seconds a block should last before
returning None.'

def read(self, block=True, timeout=None, **kwargs):

    if self.disconnected:
        raise socket.error
    if (timeout is not None):
        block = True
    try:
        return self.recv_queue.get(block, timeout)
    except:
        return None
