コード例 #1
0
ファイル: broker.py プロジェクト: OptimalBPM/of
    def unregister(self, **kwargs):
        _session_id = kwargs["_session_id"]
        if "session_id" in cherrypy.request.cookie:
            cherrypy.response.cookie = cherrypy_logout(_session_id)


        _peer = self.peers[_session_id]
        if "websocket" in _peer:
            try:
                _peer["websocker"].close()
                write_to_log(_data="Unregister: Closed websocket for address " + _peer["address"] + ".",
                             _category=EC_COMMUNICATION, _severity=SEV_DEBUG)
            except:
                write_to_log(_data="Unregister: Failed closing websocket for address " + _peer["address"] + ".",
                             _category=EC_COMMUNICATION, _severity=SEV_ERROR)

        del self.peers[_session_id]
        return {}
コード例 #2
0
ファイル: cherrypy_server.py プロジェクト: OptimalBPM/of
 def logout(self, **kwargs):
     cherrypy.response.cookie = cherrypy_logout(kwargs["_session_id"])
     return {}