def notify_app(message, client): method = message.get('method') if not method: return if not message.get('id'): _notifications.append((method, message.get('params', ()))) elif method == 'get': response = qjsonrpc.create_response(message, _notifications) client.send_message(response)
def echo_app(message, client): if not message.get('id'): return method = message.get('method') if not method or method != 'echo': return args = message.get('params', ()) response = qjsonrpc.create_response(message, args) client.send_message(response)