(self)
Completes the response and performs the following tasks:

        - Remove the `'ws4py.socket'` and `'ws4py.websocket'`
          environ keys.
        - Attach the returned websocket, if any, to the WSGI server
          using its ``link_websocket_to_server`` method.
Completes the response and performs the following tasks:
Completes the response and performs the following tasks :
def finish_response(self):
        """
        Completes the response and performs the following tasks:

        - Remove the `'ws4py.socket'` and `'ws4py.websocket'`
          environ keys.
        - Attach the returned websocket, if any, to the WSGI server
          using its ``link_websocket_to_server`` method.
        """
        ws = None
        if self.environ:
            self.environ.pop('ws4py.socket', None)
            ws = self.environ.pop('ws4py.websocket', None)

        try:
            SimpleHandler.finish_response(self)
        except:
            if ws:
                ws.close(1011, reason='Something broke')
            raise
        else:
            if ws:
                self.request_handler.server.link_websocket_to_server(ws)
def finish_response ( self ) : ws = None if self . environ : self . environ . pop ( 'ws4py.socket' , None ) ws = self . environ . pop ( 'ws4py.websocket' , None ) try : SimpleHandler . finish_response ( self ) except : if ws : ws . close ( 1011 , reason = 'Something broke' ) raise else : if ws : self . request_handler . server . link_websocket_to_server ( ws )