'Use ``WebSocket`` as iterator. Iteration only stops when the websocket
gets closed by the client.'

def __iter__(self):

    while True:
        message = self.wait()
        (yield message)
        if (message is None):
            break
