def _read_console_output(self, ws, out):
        """
        Read Websocket and forward it to the telnet

        :param ws: Websocket connection
        :param out: Output stream
        """

        while True:
            msg = yield from ws.receive()
            if msg.tp == aiohttp.WSMsgType.text:
                out.feed_data(msg.data.encode())
            elif msg.tp == aiohttp.WSMsgType.BINARY:
                out.feed_data(msg.data)
            elif msg.tp == aiohttp.WSMsgType.ERROR:
                log.critical("Docker WebSocket Error: {}".format(msg.data))
            else:
                out.feed_eof()
                ws.close()
                break
        yield from self.stop()
Read Websocket and forward it to the telnet

        :param ws: Websocket connection
        :param out: Output stream