@property<EOL><INDENT>def ws_url(self):<DEDENT>
proto = self.request.protocol.replace('<STR_LIT:http>', '<STR_LIT>')<EOL>host = self.application.ipython_app.websocket_host <EOL>if host == '<STR_LIT>':<EOL><INDENT>host = self.request.host <EOL><DEDENT>return "<STR_LIT>" % (proto, host)<EOL>
websocket url matching the current request

        turns http[s]://host[:port] into
                ws[s]://host[:port]