'Reads a message from the WebSocket server.
If on_message_callback was specified at WebSocket
initialization, this function will never return messages
Returns a future whose result is the message, or None
if the connection is closed.  If a callback argument
is given it will be called with the future when it is
ready.'

def read_message(self, callback=None):

    assert (self.read_future is None)
    future = TracebackFuture()
    if self.read_queue:
        future.set_result(self.read_queue.popleft())
    else:
        self.read_future = future
    if (callback is not None):
        self.io_loop.add_future(future, callback)
    return future
